From: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | "Robert Haas" <robertmhaas(at)gmail(dot)com> |
Cc: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Another issue in default-values patch: defaults expanded too soon |
Date: | 2008-12-17 05:27:09 |
Message-ID: | 162867790812162127o11d53283n7e4c96f1a410184b@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2008/12/17 Robert Haas <robertmhaas(at)gmail(dot)com>:
> On Tue, Dec 16, 2008 at 9:18 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> "Robert Haas" <robertmhaas(at)gmail(dot)com> writes:
>>> I wonder whether the whole architecture is wrong here. Perhaps when a
>>> function is created with N arguments of which M have default values,
>>> we should actually create M entries in pg_proc: one for each possible
>>> number of arguments from N-M up through N.
>>
>> That's been considered and rejected before, in the context of the
>> variadic-function patch which has a lot of the same issues. What it
>> mostly does is bloat pg_proc.
>
> Only if you have a large number of functions with a large number of
> optional arguments each. That's possible, I suppose, but it hardly
> seems likely, or worth worrying about.
>
>>> I think this would kill all of the problems reported thus far at one
>>> blow.
>>
>> No, it doesn't resolve any of them ... particularly not the ones
>> associated with defaults for polymorphics.
>
> I think that's hyperbole. You would probably still need to forbid
> non-polymorphic defaults for polymorphic parameters (you might be able
> to make NULL work, and maybe the empty array for anyarray... not
> sure), but I think that most of the other issues you raised would be
> addressed by my proposal. You may hate it anyway; I'm OK with that.
> :-)
it's not good solution, problem is anywhere else - we raise exception
about ambigonous call to early, when we don't have all knowleadges.
Pavel
>
> ...Robert
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2008-12-17 07:54:46 | Re: WIP: pre-upgrade page reservation |
Previous Message | Tom Lane | 2008-12-17 04:03:06 | Re: Variadic parameters vs parameter defaults |