Re: PG 9.3 complains about specified more than once ??? Those views worked in PG 9.1 + 9.2 - Mailing list pgsql-general

From David Johnston
Subject Re: PG 9.3 complains about specified more than once ??? Those views worked in PG 9.1 + 9.2
Date
Msg-id 1378929334023-5770520.post@n5.nabble.com
Whole thread Raw
In response to Re: PG 9.3 complains about specified more than once ??? Those views worked in PG 9.1 + 9.2  (David Johnston <polobo@yahoo.com>)
Responses Re: Re: PG 9.3 complains about specified more than once ??? Those views worked in PG 9.1 + 9.2
List 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 by date:

Previous
From: David Johnston
Date:
Subject: Re: PG 9.3 complains about specified more than once ??? Those views worked in PG 9.1 + 9.2
Next
From: Andreas
Date:
Subject: Re: Re: PG 9.3 complains about specified more than once ??? Those views worked in PG 9.1 + 9.2