From: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Peter Eisentraut" <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: WIP: default values for function parameters |
Date: | 2008-11-25 05:23:29 |
Message-ID: | 162867790811242123l1d3c3277oecf311ec0670e76f@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2008/11/25 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Peter Eisentraut <peter_e(at)gmx(dot)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.
>
this can be the most simple solution, I used special datatype because
a) I am afraid add more columns to system tables, b) I dislike
serialisation into text type, because simple select from this values
returns some "strange" values. But maybe I am thinking and searching
to much complicate solutions. I'll try to simplify patch.
Regards
Pavel Stehule
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2008-11-25 06:00:02 | Re: Re: [COMMITTERS] pgsql: Explicitly bind gettext() to the UTF8 locale when in use. |
Previous Message | Hitoshi Harada | 2008-11-25 04:46:10 | Re: Windowing Function Patch Review -> Standard Conformance |