Re: Another issue in default-values patch: defaults expanded too soon

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Another issue in default-values patch: defaults expanded too soon
Date: 2008-12-16 21:55:37
Message-ID: 16264.1229464537@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"David E. Wheeler" <david(at)kineticode(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message James Mansion 2008-12-16 21:58:13 Re: Elide null updates
Previous Message David E. Wheeler 2008-12-16 21:52:19 Re: Another issue in default-values patch: defaults expanded too soon