mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Carry column aliases from the parser frontend. Enables queries like
SELECT a FROM t1 tx (a); Allow join syntax, including queries like SELECT * FROM t1 NATURAL JOIN t2; Update RTE structure to hold column aliases in an Attr structure.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.19 2000/01/26 05:56:31 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.20 2000/02/15 03:37:09 thomas Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Creator functions in POSTGRES 4.2 are generated automatically. Most of
|
||||
@ -141,3 +141,26 @@ makeConst(Oid consttype,
|
||||
cnst->constiscast = constiscast;
|
||||
return cnst;
|
||||
}
|
||||
|
||||
/*
|
||||
* makeAttr -
|
||||
* creates an Attr node
|
||||
*/
|
||||
Attr *
|
||||
makeAttr(char *relname, char *attname)
|
||||
{
|
||||
Attr *a = makeNode(Attr);
|
||||
|
||||
a->relname = pstrdup(relname);
|
||||
a->paramNo = NULL;
|
||||
if (attname != NULL)
|
||||
a->attrs = lcons(makeString(pstrdup(attname)), NIL);
|
||||
a->indirection = NULL;
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user