pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #11703: ERROR: variable not found in subplan target list
3+ messages / 2 participants
[nested] [flat]

* BUG #11703: ERROR: variable not found in subplan target list
@ 2014-10-17 16:22 karl.bartel@adspert.de
  2014-10-17 22:26 ` Re: BUG #11703: ERROR: variable not found in subplan target list Tom Lane <tgl@sss.pgh.pa.us>
  2014-10-20 16:24 ` Re: BUG #11703: ERROR: variable not found in subplan target list Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 3+ messages in thread

From: karl.bartel@adspert.de @ 2014-10-17 16:22 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      11703
Logged by:          Karl Bartel
Email address:      karl.bartel@adspert.de
PostgreSQL version: 9.3.5
Operating system:   Mac OS X
Description:        

The above error occurs when I execute

CREATE TABLE my_table (
    my_column text
);

CREATE OR REPLACE FUNCTION func1(tab my_table)
RETURNS int AS $$
    SELECT CASE tab.my_column
                WHEN 'foobar' THEN 1
           END
$$ LANGUAGE sql IMMUTABLE;

CREATE OR REPLACE FUNCTION func2(
    tab my_table
)
RETURNS TABLE(ret1 int) AS $$
    SELECT func1(tab)
$$ LANGUAGE sql IMMUTABLE;

SELECT 1
FROM my_table,
     func2(my_table);


I can reproduce this with the postgres.app on OS 10.8.5:
PostgreSQL 9.3.5 on x86_64-apple-darwin13.3.0, compiled by Apple LLVM
version 5.0 (clang-500.2.79) (based on LLVM 3.3svn), 64-bit

And on my debian machine:
PostgreSQL 9.3.5 on x86_64-unknown-linux-gnu, compiled by gcc (Debian
4.7.2-5) 4.7.2, 64-bit


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #11703: ERROR: variable not found in subplan target list
  2014-10-17 16:22 BUG #11703: ERROR: variable not found in subplan target list karl.bartel@adspert.de
@ 2014-10-17 22:26 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2014-10-17 22:26 UTC (permalink / raw)
  To: karl.bartel@adspert.de; +Cc: pgsql-bugs

karl.bartel@adspert.de writes:
> The above error occurs when I execute [ this test case ]

Thanks for the test case.  Curiously, HEAD doesn't throw an error,
but it produces what seems to be an incorrect plan :-(.  Will investigate.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #11703: ERROR: variable not found in subplan target list
  2014-10-17 16:22 BUG #11703: ERROR: variable not found in subplan target list karl.bartel@adspert.de
@ 2014-10-20 16:24 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2014-10-20 16:24 UTC (permalink / raw)
  To: karl.bartel@adspert.de; +Cc: pgsql-bugs

karl.bartel@adspert.de writes:
> The following bug has been logged on the website:
> Bug reference:      11703

I've committed a fix for this.  Thanks for the report!

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2014-10-20 16:24 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-10-17 16:22 BUG #11703: ERROR: variable not found in subplan target list karl.bartel@adspert.de
2014-10-17 22:26 ` Tom Lane <tgl@sss.pgh.pa.us>
2014-10-20 16:24 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox