Re: [HACKERS] Make subquery alias optional in FROM clause

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: [HACKERS] Make subquery alias optional in FROM clause
Дата
Msg-id
7458.1487953098@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
[HACKERS] Make subquery alias optional in FROM clause Bernd Helmle <mailings@oopsware.de>
Re: [HACKERS] Make subquery alias optional in FROM clause Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Make subquery alias optional in FROM clause Bernd Helmle <mailings@oopsware.de>
Re: [HACKERS] Make subquery alias optional in FROM clause Nico Williams <nico@cryptonector.com>
Re: [HACKERS] Make subquery alias optional in FROM clause Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Make subquery alias optional in FROM clause Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Make subquery alias optional in FROM clause Bernd Helmle <mailings@oopsware.de>
Re: [HACKERS] Make subquery alias optional in FROM clause Nico Williams <nico@cryptonector.com>
Re: [HACKERS] Make subquery alias optional in FROM clause Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Make subquery alias optional in FROM clause Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Make subquery alias optional in FROM clause Craig Ringer <craig@2ndquadrant.com>
Re: [HACKERS] Make subquery alias optional in FROM clause Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Make subquery alias optional in FROM clause Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Make subquery alias optional in FROM clause Pantelis Theodosiou <ypercube@gmail.com>
Re: [HACKERS] Make subquery alias optional in FROM clause Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Make subquery alias optional in FROM clause Matthew Woodcraft <matthew@woodcraft.me.uk>
Re: [HACKERS] Make subquery alias optional in FROM clause Andres Freund <andres@anarazel.de>
Re: [HACKERS] Make subquery alias optional in FROM clause "David G. Johnston" <david.g.johnston@gmail.com>
Re: [HACKERS] Make subquery alias optional in FROM clause Bernd Helmle <mailings@oopsware.de>
Re: [HACKERS] Make subquery alias optional in FROM clause "David G. Johnston" <david.g.johnston@gmail.com>
Re: [HACKERS] Make subquery alias optional in FROM clause Greg Stark <stark@mit.edu>
Re: [HACKERS] Make subquery alias optional in FROM clause Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Make subquery alias optional in FROM clause David Fetter <david@fetter.org>
Re: [HACKERS] Make subquery alias optional in FROM clause "David G. Johnston" <david.g.johnston@gmail.com>
Re: [HACKERS] Make subquery alias optional in FROM clause Greg Stark <stark@mit.edu>
Craig Ringer  writes:
> Personally I think we need to generate one, if nothing else for error
> messages where we try to emit qualified names of columns.

Also for EXPLAIN, where there has to be a way to name everything.

> But I don't see that the name needs to be anything we can refer to
> elsewhere or anything faintly sane to type. Something like:
>   ""

-1.  "Make it ugly as sin and then pretend that nobody could conflict
with it" is neither formally correct nor nice to look at in the contexts
where people have to look at it.

I'm for something along the lines of "subquery_n" where we simply keep
incrementing n until we find a name that is not present in the query
already.  This is basically what ruleutils.c does now when it has to
cons up a unique table alias, which it must do in cases involving
inheritance.
		regards, tom lane


В списке pgsql-hackers по дате отправления
От: Peter Eisentraut
Дата:
От: Robert Haas
Дата:
FAQ