Re: Another issue in default-values patch: defaults expanded too soon - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Another issue in default-values patch: defaults expanded too soon
Date
Msg-id 16264.1229464537@sss.pgh.pa.us
Whole thread Raw
In response to Re: Another issue in default-values patch: defaults expanded too soon  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: Another issue in default-values patch: defaults expanded too soon  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
"David E. Wheeler" <david@kineticode.com> writes:
> On Dec 16, 2008, at 10:36 PM, Tom Lane wrote:
>> ... The point here would be to ensure that function replacement
>> couldn't change the parser's decisions about whether a function matches
>> a call or not; which is the case in existing releases, but has been
>> falsified by this patch.
>> 
>> If that's acceptable, then we could insert default expressions at plan
>> time with confidence that no defaults we need have disappeared under  
>> us.

> Wouldn't you still have the problem if you still allow the default  
> values to be changed? And I would hope that they could be changed!

No, you could change the *values* of the default expressions.  What
you'd not be allowed to do is remove a default entirely.  (Or, perhaps,
add one; I'm less sure about that.)  The point here is that adding or
removing a default changes the set of calls a function could possibly
match, just as changing the list of parameter types changes what it
can match.  We don't allow the latter and I'm thinking we shouldn't
allow the former either.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: Another issue in default-values patch: defaults expanded too soon
Next
From: James Mansion
Date:
Subject: Re: Elide null updates