Re: fix for PL/PgSQL segfault

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: fix for PL/PgSQL segfault
Date: 2003-01-16 18:35:53
Message-ID: 1042742152.20006.94.camel@tokyo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Thu, 2003-01-16 at 12:18, Tom Lane wrote:
> Actually, the fix I had in mind was to cause the SELECT to assign a row
> of nulls to the RECORD variable

Heh, I just can't seem to get this patch right :-)

> Then, if rec->tup is found to be NULL in RETURN NEXT, that means no
> attempt has ever been made to assign to the variable. I'm undecided
> about whether that case should return nulls as per your patch, or should
> raise an error.

It seems a little inconsistent to treat a "never-assigned-to" variable
differently than one which has been the target of a SELECT INTO that
returns zero rows, doesn't it?

In any case, I don't particularly mind which behavior we choose: when
there's a consensus, I'll send in a new version of the patch.

Cheers,

Neil
--
Neil Conway <neilc(at)samurai(dot)com> || PGP Key ID: DB3C29FC

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2003-01-16 18:41:01 Re: ALTER TABLE .. SET WITHOUT OIDS -- ROUND 2
Previous Message Neil Conway 2003-01-16 18:34:00 Re: replace oidrand() with random_sample()