Re: WIP: default values for function parameters - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: WIP: default values for function parameters
Date
Msg-id 162867790811261414w4a22e9edj4445d8da47794377@mail.gmail.com
Whole thread Raw
In response to Re: WIP: default values for function parameters  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WIP: default values for function parameters
List pgsql-hackers
Hello

I am sending actualized versions - I accepted Tom's comments - default
expressions are serialised List stored in text field.

Regards
Pavel Stehule

2008/11/25 Tom Lane <tgl@sss.pgh.pa.us>:
> Peter Eisentraut <peter_e@gmx.net> writes:
>> On Monday 24 November 2008 23:21:15 Pavel Stehule wrote:
>>> Default parameters are implemented similar to variadic functions - so
>>> no changes on PL part - all changes are on caller part.
>
>> Then I don't understand why you need this special data type instead of using
>> an array of text with nulls for parameters without default.
>
> I'm not even sure you need to store any nulls.  We're going to require
> defaults to be provided for the last N parameters consecutively, right?
> So that's just what the array contents are.  Or maybe it's not an array
> at all but a single text item containing the representation of a List
> --- compare the storage of index expressions.  There shouldn't be any
> need to read the contents of the value during function resolution;
> an appropriate representation will have the number of non-defaultable
> parameters stored as a separate integer column.
>


>                        regards, tom lane
>

Attachment

pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: What's going on with pgfoundry?
Next
From: Steve Crawford
Date:
Subject: Re: What's going on with pgfoundry?