Skip site navigation (1) Skip section navigation (2)

Re: RFD: Don't force plpgsql IN parameters to constant

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Steve Prentice <prentice(at)cisco(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: RFD: Don't force plpgsql IN parameters to constant
Date: 2009-07-30 00:23:20
Message-ID: 4A70E7F8.2060008@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackers

Steve Prentice wrote:
> Is there a reason we force plpgsql IN parameters to constant? The 
> reason I ask is because having them mutable would go a long way in 
> easing a port from Informix's SPL. For better or worse, we have a fair 
> amount of code in SPL that does something like:
>
>    -- pObjectId is an IN parameter
>    IF pObjectId IS NULL THEN
>        pObjectId := newid();
>    END IF;
>
> I understand it may be better to use a different technique here, but 
> we have a substantial amount of SPL (40k lines) and if we could make 
> the IN parameters mutable, it would make my day.
>

First reaction is that it would mean we could never pass them by 
reference. I know PLPerl uses in effect pass by copy, but what does 
PLPgsql do?

cheers

andrew

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2009-07-30 00:26:54
Subject: Re: RFD: Don't force plpgsql IN parameters to constant
Previous:From: Steve PrenticeDate: 2009-07-29 23:55:05
Subject: RFD: Don't force plpgsql IN parameters to constant

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group