Re: BUG #5078: returns setof functions fails after table structure altered - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5078: returns setof functions fails after table structure altered
Date
Msg-id 25782.1253813729@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5078: returns setof functions fails after table structure altered  ("Sergey Manakov" <vialorn@gmail.com>)
List pgsql-bugs
"Sergey Manakov" <vialorn@gmail.com> writes:
> alter table biz_uks
>     drop column remark
> ;

> create or replace function set__biz_uks()
> returns setof biz_uks
> security definer volatile language plpgsql as $$
> declare
>     res    biz_uks;
> begin
>     return query
>     select res.*;
> end;
> $$ ;

Yeah, plpgsql has never been tremendously good with rowtypes containing
dropped columns.  There is a fix in CVS HEAD that deals with this case
http://archives.postgresql.org/pgsql-committers/2009-08/msg00068.php
but it was deemed too invasive to risk back-patching.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Sergey Manakov"
Date:
Subject: BUG #5078: returns setof functions fails after table structure altered
Next
From: Russell Smith
Date:
Subject: Re: BUG #5063: MS Access crashes by quiting after linking tables with PostgreSQL