Re: PG 9.3 complains about specified more than once ??? Those views worked in PG 9.1 + 9.2

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: PG 9.3 complains about specified more than once ??? Those views worked in PG 9.1 + 9.2
Дата
Msg-id 1378929334023-5770520.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: PG 9.3 complains about specified more than once ??? Those views worked in PG 9.1 + 9.2  (David Johnston <polobo@yahoo.com>)
Ответы Re: Re: PG 9.3 complains about specified more than once ??? Those views worked in PG 9.1 + 9.2  (Andreas <maps.on@gmx.net>)
Список pgsql-general
Try these too, please:

WITH
  tblA (a_id, a_val) AS ( VALUES (1::integer, 'one-1'::varchar) )
, tblB (b_id, b_val) AS ( VALUES (1::integer, 'one-b'::varchar) )
, tblC (c_id, c_val) AS ( VALUES (1::integer, 'one-c'::varchar) )
SELECT *
FROM (
tblA JOIN tblB ON (tblA.a_id = tblB.b_id)
) AS refD
JOIN tblA ON (tblA.a_id = refD.a_id)
;

WITH
  tblA (a_id, a_val) AS ( VALUES (1::integer, 'one-1'::varchar) )
, tblB (b_id, b_val) AS ( VALUES (1::integer, 'one-b'::varchar) )
, tblC (c_id, c_val) AS ( VALUES (1::integer, 'one-c'::varchar) )
SELECT *
FROM (
tblA JOIN tblB ON (tblA.a_id = tblB.b_id)
) AS refD
JOIN tblA ON (tblA.a_id = tblB.a_id)
; --this one should fail trying to reference tblB


The reference to tblA is used inside refD and outside of it as well; but no
table aliases are used.

Thanks

David J.



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/PG-9-3-complains-about-specified-more-than-once-Those-views-worked-in-PG-9-1-9-2-tp5770489p5770520.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: PG 9.3 complains about specified more than once ??? Those views worked in PG 9.1 + 9.2
Следующее
От: Andreas
Дата:
Сообщение: Re: Re: PG 9.3 complains about specified more than once ??? Those views worked in PG 9.1 + 9.2