From: Pavel Stehule on 12 Jan 2010 05:10 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
|
Pages: 1 Prev: NOT NULL violation and error-message Next: Fix for memory leak in dblink |