Bug about column references within subqueries used in selects

From: NikhilS <nikkhils(at)gmail(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Bug about column references within subqueries used in selects
Date: 2007-04-12 12:38:40
Message-ID: d3c4af540704120538y42ffd87cye438a00e2729a0e8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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_test;

a ?column?
---------- -------------------------
20 30

Is the problem with the code in colNameToVar or maybe we should add checks
in transformSubLink?

Regards,
Nikhils
--
EnterpriseDB http://www.enterprisedb.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2007-04-12 12:42:51 Re: autovacuum multiworkers, patch 5
Previous Message Heikki Linnakangas 2007-04-12 12:08:59 Re: elog(FATAL) vs shared memory