Re: [HACKERS] Bug about column references within subqueries used in selects

2007-04-12 Thread Tom Lane
NikhilS <[EMAIL PROTECTED]> writes: > Yes this is fine, but in "select columnname from tablename" using column > references of the other involved table is what I am objecting to. You can object till you're blue in the face, but this behavior is not changing because it's *required by spec*. Outer

Re: [HACKERS] Bug about column references within subqueries used in selects

2007-04-12 Thread Bort, Paul
> > I don't think so...the columns of update_test are visible to the > scalar subquery...that way you can use fields from 'a' > to filter the > subquery... > select a, (select y from supdate_test where x = a) from > update_test; > > > Yes this is fine, but in "se

Re: [HACKERS] Bug about column references within subqueries used in selects

2007-04-12 Thread NikhilS
Hi, On 4/12/07, Merlin Moncure <[EMAIL PROTECTED]> wrote: On 4/12/07, NikhilS <[EMAIL PROTECTED]> wrote: > Hi, > > Shouldn't the final command below cause a 'column "b" does not exist error'? > > create table update_test (a int, b int); > create table supdate_test(x int, y int); > insert into u

Re: [HACKERS] Bug about column references within subqueries used in selects

2007-04-12 Thread Merlin Moncure
On 4/12/07, NikhilS <[EMAIL PROTECTED]> wrote: Hi, Shouldn't the final command below cause a 'column "b" does not exist error'? create table update_test (a int, b int); create table supdate_test(x int, y int); insert into update_test values (20, 30); insert into supdate_test values (40, 50); se

[HACKERS] Bug about column references within subqueries used in selects

2007-04-12 Thread NikhilS
Hi, Shouldn't the final command below cause a 'column "b" does not exist error'? create table update_test (a int, b int); create table supdate_test(x int, y int); insert into update_test values (20, 30); insert into supdate_test values (40, 50); select a, (select b from supdate_test) from update