bug in integration SQL parser to plpgsq - Mailing list pgsql-hackers

From Pavel Stehule
Subject bug in integration SQL parser to plpgsq
Date
Msg-id 162867791001120210j7db534e1tf45eff7a1f61af66@mail.gmail.com
Whole thread Raw
Responses Re: bug in integration SQL parser to plpgsq  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: bug in integration SQL parser to plpgsq  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hello

it doesn't support EXPLAIN as possible begin of SQL statement:

postgres=# create or replace function foo(_a int) returns void as
$$declare s varchar; begin for s in explain select * from omega where
a = _a loop raise notice '%', s; end loop; return; end; $$ language
plpgsql;
CREATE FUNCTION
postgres=# select foo(10);
ERROR:  column "_a" does not exist
CONTEXT:  PL/pgSQL function "foo" line 1 at FOR over SELECT rows

postgres=# create or replace function foo(_a int) returns void as
$$declare s varchar; begin for s in select * from omega where a = _a
loop raise notice '%', s; end loop; return; end; $$ language plpgsql;
CREATE FUNCTION
postgres=# select foo(10);foo
-----

(1 row)

Regards
Pavel Stehule


pgsql-hackers by date:

Previous
From: Takahiro Itagaki
Date:
Subject: Re: NOT NULL violation and error-message
Next
From: Fujii Masao
Date:
Subject: Re: Streaming replication status