Re: patch fixing the old RETURN NEXT bug

From: Neil Conway <neilc(at)samurai(dot)com>
To: "Sergey E(dot) Koposov" <math(at)sai(dot)msu(dot)ru>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: patch fixing the old RETURN NEXT bug
Date: 2006-02-19 23:59:44
Message-ID: 1140393584.2615.13.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Sun, 2006-02-12 at 20:15 +0300, Sergey E. Koposov wrote:
> I'm proposing the fix of this bug:
> http://archives.postgresql.org/pgsql-hackers/2005-02/msg00498.php

I think the suggested logic for compatible_tupdesc() is still wrong. For
example, the patch rejects the following:

create table usno (ra real, dec real, bmag real, rmag real, ipix int8);
create function ret_next_check() returns setof usno as $$
declare
r record;
begin
for r in select * from usno loop
return next r;
end loop;
return;
end;
$$ language plpgsql;

insert into usno values (1.0, 2.0, 3.0, 4.0, 5);
select * from ret_next_check();
alter table usno drop column ipix;
select * from ret_next_check(); -- fails, should succeed

Also, this patch should include updates to the regression tests.

-Neil

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message elein 2006-02-20 00:04:44 Re: Domains and supporting functions
Previous Message Satoshi Nagayasu 2006-02-19 23:49:43 Re: Prepared Xacts and Vacuum question

Browse pgsql-patches by date

  From Date Subject
Next Message James William Pye 2006-02-20 00:47:42 ScanDirections
Previous Message Steve Atkins 2006-02-19 22:14:47 Re: pg_service.conf