X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 04F29DA138 for ; Wed, 9 Nov 2005 18:05:44 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 08702-07 for ; Wed, 9 Nov 2005 22:05:40 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 4B71BD9BB1 for ; Wed, 9 Nov 2005 18:05:40 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id jA9M5gDh019850; Wed, 9 Nov 2005 17:05:42 -0500 (EST) To: mario.splivalo@mobart.hr Cc: pgsql-sql@postgresql.org Subject: Re: RETURNS SETOF table; language 'sql' In-reply-to: <1131571700.24088.16.camel@localhost.localdomain> References: <1131549050.7758.11.camel@ekim> <18100.1131562181@sss.pgh.pa.us> <1131571700.24088.16.camel@localhost.localdomain> Comments: In-reply-to Mario Splivalo message dated "Wed, 09 Nov 2005 22:28:20 +0100" Date: Wed, 09 Nov 2005 17:05:42 -0500 Message-ID: <19849.1131573942@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.006 required=5 tests=[AWL=0.006] X-Spam-Score: 0.006 X-Spam-Level: X-Archive-Number: 200511/82 X-Sequence-Number: 23333 Mario Splivalo writes: > Works fine. I remind you again, this is on a newly created database. Yup, works fine for me too. > When I run it, again the same:pulitzer2=# select * from > get_ad_test(1004); > ERROR: query-specified return row and actual function return row do not > match > pulitzer2=# Ah, I bet I know the problem: alter table ads add column z int; << function still works ... >> alter table ads drop column z; << function no longer works... >> 7.4 isn't too good about coping with dropped columns in rowtypes. This problem is fixed in 8.0 and up. regards, tom lane