Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group