Re: RETURNS SETOF table; language 'sql' - Mailing list pgsql-sql

From Mario Splivalo
Subject Re: RETURNS SETOF table; language 'sql'
Date
Msg-id 1131574624.24088.18.camel@localhost.localdomain
Whole thread Raw
In response to Re: RETURNS SETOF table; language 'sql'  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
On Wed, 2005-11-09 at 17:05 -0500, Tom Lane wrote:
> Mario Splivalo <mario.splivalo@mobart.hr> 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



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: RETURNS SETOF table; language 'sql'
Next
From: "Gregory S. Williamson"
Date:
Subject: Re: Como ejecutar una funcion insert en plpgsql....