From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Thomas Lockhart <lockhart(at)fourpalms(dot)org> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: Planned cleanups in attribute parsing |
Date: | 2002-03-06 23:11:19 |
Message-ID: | 27434.1015456279@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thomas Lockhart <lockhart(at)fourpalms(dot)org> writes:
>> Alias: for AS clauses. Carries a "char *aliasname" and a List of column
>> alias names. The current uses of Attr in range table entries would
>> become Alias.
> Is there a one-to-one relationship between the alias and the column? Or
> does the list of column names actually have more than one entry? Or is
> the "list of column alias names" the qualified name of the column?
Basically type Alias represents an AS clause, which can come in two
flavors: just "AS foo", or "AS foo(bar1,bar2,bar3)" for renaming a
FROM-list item along with its columns. So the list of names in this
case represents individual column names, *not* a qualified name.
One reason that I want to separate this from Attr is that the list
of names has a totally different meaning from what it has in Attr.
>> ColumnRef: for referencing a column (possibly qualified, possibly with
>> array subscripts) in the raw grammar output. Carries a List of names
>> which correspond to the dotted names (eg, a.b.c), plus a List of array
>> subscripting info (currently called "indirection" in Attr, but I wonder
>> if "subscripts" wouldn't be a more useful name).
> Would it be helpful to separate the name itself from the qualifying
> prefixes? istm that most use cases would require this anyway...
Remember this is raw parsetree output; the grammar does not have a real
good idea which names are qualifiers and which are field names and/or
function names. The parse analysis phase will rip the list apart and
determine what's what. The output of that will be some other node type
(eg, a Var).
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Gaston Micheri | 2002-03-06 23:19:23 | Odbc, postgresql and disconnected recordsets |
Previous Message | Thomas Lockhart | 2002-03-06 22:53:25 | Re: Planned cleanups in attribute parsing |