From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Regression in COPY FROM caused by 9f8377f7a2 |
Date: | 2023-09-26 06:48:31 |
Message-ID: | d675102099df9b66f97fc2f9fc627af1ecc69c80.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, 2023-09-25 at 17:49 -0400, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> > On 2023-09-25 Mo 11:06, Andrew Dunstan wrote:
> > > On 2023-09-25 Mo 04:59, Laurenz Albe wrote:
> > > > CREATE TABLE boom (t character varying(5) DEFAULT 'a long string');
>
> > Thinking about this a little more, wouldn't it be better if we checked
> > at the time we set the default that the value is actually valid for the
> > given column? This is only one manifestation of a problem you could run
> > into given this table definition.
>
> I dunno, it seems at least possible that someone would do this
> deliberately as a means of preventing the column from being defaulted.
> In any case, the current behavior has stood for a very long time and
> no one has complained that an error should be thrown sooner.
Moreover, this makes restoring a pg_dump from v15 to v16 fail, which
should never happen. This is how I got that bug report.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Smith | 2023-09-26 07:32:58 | Re: Invalidate the subscription worker in cases where a user loses their superuser status |
Previous Message | Michael Paquier | 2023-09-26 06:48:07 | Re: Incorrect handling of OOM in WAL replay leading to data loss |