pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: karl.bartel@adspert.de
To: pgsql-bugs@postgresql.org
Subject: BUG #11703: ERROR: variable not found in subplan target list
Date: Fri, 17 Oct 2014 16:22:36 +0000
Message-ID: <20141017162236.2523.74453@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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



view thread (3+ messages)  latest in thread

Message-ID: <20141017162236.2523.74453@wrigleys.postgresql.org>
Permalink:  ../20141017162236.2523.74453@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20141017162236.2523.74453@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: karl.bartel@adspert.de
  Subject: Re: BUG #11703: ERROR: variable not found in subplan target list
  In-Reply-To: <20141017162236.2523.74453@wrigleys.postgresql.org>
  References: <20141017162236.2523.74453@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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