aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/util/internal.c
blob: d1af2062fceb9d13140e2abbd9a903bb41c202b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*-------------------------------------------------------------------------
 *
 * internal.c--
 *	  Definitions required throughout the query optimizer.
 *
 * Copyright (c) 1994, Regents of the University of California
 *
 *
 * IDENTIFICATION
 *	  $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/internal.c,v 1.4 1997/09/07 04:44:24 momjian Exp $
 *
 *-------------------------------------------------------------------------
 */

/*
 *		---------- SHARED MACROS
 *
 *		Macros common to modules for creating, accessing, and modifying
 *		query tree and query plan components.
 *		Shared with the executor.
 *
 */
#include <sys/types.h>

#include "postgres.h"

#include "optimizer/internal.h"

#include "nodes/relation.h"
#include "nodes/plannodes.h"
#include "nodes/primnodes.h"
#include "utils/palloc.h"

#ifdef NOT_USED
/*****************************************************************************
 *
 *****************************************************************************/

/* the following should probably be moved elsewhere -ay */

TargetEntry    *
MakeTLE(Resdom * resdom, Node * expr)
{
	TargetEntry    *rt = makeNode(TargetEntry);

	rt->resdom = resdom;
	rt->expr = expr;
	return rt;
}

Var			   *
get_expr(TargetEntry * tle)
{
	Assert(tle != NULL);
	Assert(tle->expr != NULL);

	return ((Var *) tle->expr);
}

#endif							/* 0 */