Re: Protection lost in expression eval changeover - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Protection lost in expression eval changeover
Date
Msg-id 19025.1490726618@sss.pgh.pa.us
Whole thread Raw
In response to Protection lost in expression eval changeover  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Protection lost in expression eval changeover  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2017-03-28 13:52:50 -0400, Tom Lane wrote:
>> So it seems like we are missing some needed protection.  I'm inclined
>> to think that it'd be all right to just throw an error immediately in
>> CheckVarSlotCompatibility if the target column is dropped.

> Hm - so far we've pretty widely only set columns to NULL in that
> case. You don't see concerns with triggering errors in cases we
> previously hadn't?

Well, in principle these errors ought to be unreachable at all; they're
only there to backstop any possible failure to notice stale plans.
I don't see a strong reason why we need to allow a dropped column to go
to null while we throw an immediate error for a change in column type.
(If there is some reason, hopefully beta testing will find it.)

> I wonder if it'd not be better to add a branch to slot_deform_tuple's
> main loop like

Much rather not do that.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Getting server crash after running sqlsmith
Next
From: Stephen Frost
Date:
Subject: Re: Monitoring roles patch