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

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] Make subquery alias optional in FROM clause
Дата
Msg-id CA+Tgmobj7Y11DxZju13dw7ijba7L43de6im4eAa2iHqOOMmvqA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Make subquery alias optional in FROM clause  (Nico Williams <nico@cryptonector.com>)
Ответы Re: [HACKERS] Make subquery alias optional in FROM clause  (Andres Freund <andres@anarazel.de>)
Re: [HACKERS] Make subquery alias optional in FROM clause  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Feb 22, 2017 at 10:33 PM, Nico Williams <nico@cryptonector.com> wrote:
> On Wed, Feb 22, 2017 at 10:08:38AM -0500, Tom Lane wrote:
>> Bernd Helmle <mailings@oopsware.de> writes:
>> >> From time to time, especially during migration projects from Oracle to
>> > PostgreSQL, i'm faced with people questioning why the alias in the FROM
>> > clause for subqueries in PostgreSQL is mandatory. The default answer
>> > here is, the SQL standard requires it.
>>
>> Indeed.  When I wrote the comment you're referring to, quite a few years
>> ago now, I thought that popular demand might force us to allow omitted
>> aliases.  But the demand never materialized.  At this point it seems
>> clear to me that there isn't really good reason to exceed the spec here.
>> It just encourages people to write unportable SQL code.
>
> I suspect most users, like me, just roll their eyes, grumble, and put up
> with it rather than complain.  It's a pain point, but tolerable enough
> that no one bothers to demand a change.  Now that it's been done though,
> allow me to add my voice in favor of it!

+1 to all of that.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: [HACKERS] PATCH: Batch/pipelining support for libpq
Следующее
От: Venkata B Nagothi
Дата:
Сообщение: [HACKERS] Range Partitioning behaviour - query