Re: Referencing a superselect's column by it's declared alias from a subselect fails

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Casey Allen Shobe <cshobe(at)secureworks(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Referencing a superselect's column by it's declared alias from a subselect fails
Date: 2002-09-15 15:16:09
Message-ID: 28845.1032102969@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Casey Allen Shobe <cshobe(at)secureworks(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Casey Allen Shobe 2002-09-15 15:45:53 Re: Postgres storing time in strange manner
Previous Message pgsql-bugs 2002-09-15 15:12:03 Bug #768: Wrong special characters handling in Java