Re: [HACKERS] Almost there on column aliases

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Almost there on column aliases
Дата
Msg-id 15745.950803057@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Almost there on column aliases  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Список pgsql-hackers
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
> I've just looked it up in the Date book: table aliases are optional in
> general, but column aliases require a table alias. The bnf looks like

>   table [ [ AS ] range-variable [ ( column-commalist ) ] ]

OK, but that doesn't really solve my concern about rule bloat, because
if you write "FROM table alias", you'll still get a list of column names
appended to that by the system.

Here is a possible answer that I think would address both our concerns:
keep track of how many column aliases the user actually wrote (without
counting the Attr-list entries added by the system for its internal
convenience), and dump only the user-supplied aliases in rule strings.
This'd be easy enough to do with an extra field in Attr nodes.
It'd not only preserve compactness in the cases we previously handled,
but it'd make the reverse-listed display of rules more like the original
query in cases where the user did write some aliases (but not a full
set).
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Definitional issue for INET types
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Date/time types: big change