"ERROR: Query-specified return tuple and actual function return tuple do not match" after dropping column - Mailing list pgsql-bugs

From Andrzej Kosmala
Subject "ERROR: Query-specified return tuple and actual function return tuple do not match" after dropping column
Date
Msg-id 009401c2ba84$20108c40$0301a8c0@abit
Whole thread Raw
Responses Re: "ERROR: Query-specified return tuple and actual function  (Joe Conway <mail@joeconway.com>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #872: Cursor scrolling
Next
From: Joe Conway
Date:
Subject: Re: "ERROR: Query-specified return tuple and actual function