Re: RFD: Don't force plpgsql IN parameters to constant - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: RFD: Don't force plpgsql IN parameters to constant
Date
Msg-id 4A70E7F8.2060008@dunslane.net
Whole thread Raw
In response to RFD: Don't force plpgsql IN parameters to constant  (Steve Prentice <prentice@cisco.com>)
Responses Re: RFD: Don't force plpgsql IN parameters to constant  (Steve Prentice <prentice@cisco.com>)
Re: RFD: Don't force plpgsql IN parameters to constant  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-hackers by date:

Previous
From: Steve Prentice
Date:
Subject: RFD: Don't force plpgsql IN parameters to constant
Next
From: Robert Haas
Date:
Subject: Re: RFD: Don't force plpgsql IN parameters to constant