Re: Referencing a superselect's column by it's declared alias from a subselect fails - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Referencing a superselect's column by it's declared alias from a subselect fails
Date
Msg-id 28845.1032102969@sss.pgh.pa.us
Whole thread Raw
In response to Referencing a superselect's column by it's declared alias from a subselect fails  (Casey Allen Shobe <cshobe@secureworks.net>)
List pgsql-bugs
Casey Allen Shobe <cshobe@secureworks.net> writes:
> In the following statement (which works), if I s/ps."usesysid"/"UID"/ in the
> two innermost subselects (such that it refers to the declared alias rather
> than the true column name), it fails.  In DB2, it works in similar
> situations.

I find that hard to believe.  If true, DB2 is broken.  An output-column
alias should not be visible in expressions for other output columns.
There are obvious circularity problems with allowing such a thing.

            regards, tom lane

pgsql-bugs by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #768: Wrong special characters handling in Java
Next
From: Casey Allen Shobe
Date:
Subject: Re: Postgres storing time in strange manner