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 CAC06D9DDB for ; Wed, 9 Nov 2005 18:19:12 -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 15122-01 for ; Wed, 9 Nov 2005 22:19:08 +0000 (GMT) X-Greylist: delayed 00:48:43.473953 by SQLgrey- Received: from ls405.htnet.hr (ls405.htnet.hr [195.29.150.97]) by svr1.postgresql.org (Postfix) with ESMTP id 9DA50D9BAF for ; Wed, 9 Nov 2005 18:19:09 -0400 (AST) Received: from ls422.t-com.hr (ls422.t-com.hr [195.29.150.237]) by ls405.htnet.hr (0.0.0/8.12.10) with ESMTP id jA9MJAWj023015; Wed, 9 Nov 2005 23:19:11 +0100 Received: from ls422.t-com.hr (localhost.localdomain [127.0.0.1]) by ls422.t-com.hr (Qmlai) with ESMTP id 23281988046; Wed, 9 Nov 2005 23:19:10 +0100 (CET) X-Envelope-Sender: mario.splivalo@mobart.hr X-Envelope-Sender: mario.splivalo@mobart.hr Received: from ls422.t-com.hr (localhost.localdomain [127.0.0.1]) by ls422.t-com.hr (Qmlai) with ESMTP id 1FA3D988043; Wed, 9 Nov 2005 23:19:10 +0100 (CET) Received: from 83-131-43-58.adsl.net.t-com.hr (83-131-43-58.adsl.net.t-com.hr [83.131.43.58]) by ls422.t-com.hr (Qmlai) with ESMTP id B98908B8049; Wed, 9 Nov 2005 23:19:09 +0100 (CET) Subject: Re: RETURNS SETOF table; language 'sql' From: Mario Splivalo Reply-To: mario.splivalo@mobart.hr To: Tom Lane Cc: pgsql-sql@postgresql.org In-Reply-To: <19849.1131573942@sss.pgh.pa.us> References: <1131549050.7758.11.camel@ekim> <18100.1131562181@sss.pgh.pa.us> <1131571700.24088.16.camel@localhost.localdomain> <19849.1131573942@sss.pgh.pa.us> Content-Type: text/plain Organization: Mob-Art Date: Wed, 09 Nov 2005 23:17:04 +0100 Message-Id: <1131574624.24088.18.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/83 X-Sequence-Number: 23334 On Wed, 2005-11-09 at 17:05 -0500, Tom Lane wrote: > 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. So, I should drop the table, recreate it, and then the function should work ok? I'll try ASAP, I'll just jump to a gas station for a beer :) Mike