Re: Relax table alias conflict rule in 9.3?

Поиск
Список
Период
Сортировка
От Andreas
Тема Re: Relax table alias conflict rule in 9.3?
Дата
Msg-id 5282C028.9050602@gmx.net
обсуждение исходный текст
Ответ на Relax table alias conflict rule in 9.3?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Am 11.11.2013 02:06, schrieb Tom Lane:
> We had a complaint
> http://www.postgresql.org/message-id/E1VJuBy-0002a1-Qv@wrigleys.postgresql.org
> about the fact that 9.3 rejects queries with duplicate table aliases like
> this:
>
> select * from tenk1 a left join (int4_tbl a cross join int8_tbl b) c on unique1 = f1;
> ERROR:  table name "a" specified more than once
>
> I pushed back on this on the grounds that this is illegal per SQL spec:
> the standard is pretty clear that you can't use the same table alias more
> than once in a given level of SELECT (cf SQL:2008 7.6 <table reference>,
> syntax rules 6 and 7).  However, the complainant has a good point that if
> we've accepted this since forever, ceasing to accept it is going to cause
> people problems.  Moreover, my argument that it makes things ambiguous for
> LATERAL doesn't hold a lot of water.  Duplicate table aliases were
> potentially ambiguous before, too, but we allowed the case anyway and only
> complained if there's actually an ambiguous reference.  We could do the
> same for LATERAL references.
> [...]
>
> So I propose removing that call, adding regression tests like these
> examples, and back-patching to 9.3.  Any objections?
>
>             regards, tom lane
>

Great!   :)

This change would help me upgrade to 9.3x because I've got lots of views 
that use a table alias that gets rejected by 9.3 while restoring the 
dump of 9.2.

When do you plan to have it in an official release?


Cheers
Andreas




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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: FDW: possible resjunk columns in AddForeignUpdateTargets
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Clang 3.3 Analyzer Results