PostgreSQL 7.3 on Linux After dropping column functions return error message: "ERROR: Query-specified return tuple and actual function return tuple do not match"
template1=# create table test(id integer, cdate timestamp); CREATE TABLE template1=# INSERT INTO test VALUES (1,now()); INSERT 17515 1 template1=# INSERT INTO test VALUES (2,now()); INSERT 17516 1 template1=# INSERT INTO test VALUES (3,now()); INSERT 17517 1 template1=# create function ftest() returns setof test as 'select * from test' language 'sql'; CREATE FUNCTION template1=# select * from ftest(); id | cdate ----+---------------------------- 1 | 2003-01-12 22:17:19.814273 2 | 2003-01-12 22:17:22.899388 3 | 2003-01-12 22:17:25.246219 (3 rows) template1=# alter table test drop column cdate; ALTER TABLE template1=# select * from ftest(); ERROR: Query-specified return tuple and actual function return tuple do not match template1=# alter table test add column cdate timestamp; ALTER TABLE template1=# select * from ftest(); ERROR: Query-specified return tuple and actual function return tuple do not match template1=# drop function ftest(); DROP FUNCTION template1=# create function ftest() returns setof test as 'select * from test' language 'sql'; CREATE FUNCTION template1=# select * from ftest(); ERROR: Query-specified return tuple and actual function return tuple do not match template1=# create function ftest2() returns setof test as 'select * from test' language 'sql'; CREATE FUNCTION template1=# select * from ftest2(); ERROR: Query-specified return tuple and actual function return tuple do not match Yours sincerely, Andrzej Kosmala ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html