diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-03-21 16:02:16 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-03-21 16:02:16 +0000 |
commit | 95ef6a344821655ce4d0a74999ac49dd6af6d342 (patch) | |
tree | df484a4c9dde9827894ab707917c001a1f376749 /src/backend/nodes/makefuncs.c | |
parent | 8c9c8ca2b57e4edef218245ccdc9eef7c06425d8 (diff) |
First phase of SCHEMA changes, concentrating on fixing the grammar and
the parsetree representation. As yet we don't *do* anything with schema
names, just drop 'em on the floor; but you can enter schema-compatible
command syntax, and there's even a primitive CREATE SCHEMA command.
No doc updates yet, except to note that you can now extract a field
from a function-returning-row's result with (foo(...)).fieldname.
Diffstat (limited to 'src/backend/nodes/makefuncs.c')
-rw-r--r-- | src/backend/nodes/makefuncs.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/backend/nodes/makefuncs.c b/src/backend/nodes/makefuncs.c index 36f8460b46c..d8bf80a52ef 100644 --- a/src/backend/nodes/makefuncs.c +++ b/src/backend/nodes/makefuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.27 2002/03/20 19:44:04 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.28 2002/03/21 16:00:40 tgl Exp $ */ #include "postgres.h" @@ -159,19 +159,18 @@ makeNullConst(Oid consttype) } /* - * makeAttr - - * creates an Attr node + * makeAlias - + * creates an Alias node + * + * NOTE: the given name is copied, but the colnames list (if any) isn't. */ -Attr * -makeAttr(char *relname, char *attname) +Alias * +makeAlias(const char *aliasname, List *colnames) { - Attr *a = makeNode(Attr); + Alias *a = makeNode(Alias); - a->relname = pstrdup(relname); - a->paramNo = NULL; - if (attname != NULL) - a->attrs = makeList1(makeString(pstrdup(attname))); - a->indirection = NULL; + a->aliasname = pstrdup(aliasname); + a->colnames = colnames; return a; } |