Re: [HACKERS] Make subquery alias optional in FROM clause
От | David G. Johnston |
---|---|
Тема | Re: [HACKERS] Make subquery alias optional in FROM clause |
Дата | |
Msg-id | CAKFQuwb4Vo+_oj2mfqEo=Jv-iddvN-90BjcwU1kUN7jDssKdJQ@mail.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
|
Список | pgsql-hackers |
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'll contribute to the popular demand aspect but given that the error is good and the fix is very simple its not exactly a strong desire.
My code is already unportable since I choose to use "::" for casting - and I'm sure quite a few other PostgreSQL-specific things - so the portability aspect to the argument is already thin for me and moreso given other DBMSes already relax the requirement.
David J.
В списке pgsql-hackers по дате отправления: