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

From: "Andrzej Kosmala" <ak(at)webproject(dot)pl>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: "ERROR: Query-specified return tuple and actual function return tuple do not match" after dropping column
Date: 2003-01-12 21:46:54
Message-ID: 009401c2ba84$20108c40$0301a8c0@abit
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2003-01-13 06:39:22 Bug #872: Cursor scrolling
Previous Message Silvio Scarpati 2003-01-12 09:37:23 Re: Function round(double precision, integer) - Fast backward compatibility solution