Try this: ============================= DROP TABLE bug_table; CREATE TABLE "bug_table" ( "id" BIGINT NOT NULL, test VARCHAR, CONSTRAINT "test_table_pkey" PRIMARY KEY("id") ) WITHOUT OIDS;
DROP FUNCTION buggy_procedure(); CREATE FUNCTION buggy_procedure() RETURNS SETOF bug_table AS $$ BEGIN -- @todo hide password RETURN QUERY ( SELECT * FROM bug_table ); END; $$ LANGUAGE plpgsql STRICT SECURITY DEFINER; SELECT * FROM buggy_procedure(); -- All Okey ALTER TABLE bug_table DROP COLUMN test; SELECT * FROM buggy_procedure(); -- Bug ========================= For our system this bug (or functionality) is a big problem. We cannot drop table and import data for modified table - some table are huge and sometimes there are many references. I've tried to use RETURN TABLE but I have also problem with this: http://groups.google.pl/group/pgsql.general/browse_thread/thread/a028c9ed2663b69b?hl=pl# Michal Szymanski http://blog.szymanskich.net -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs