Mark Hills <mark@xwax.org> writes:
> On Fri, 3 Nov 2023, Tom Lane wrote:
>> However, then it's not clear why it would've worked
>> in 15.4 which does the same thing. I wonder whether you are
>> using this function in a column default for the troublesome
>> table.
> Yes, it's just a simple DEFAULT:
> CREATE TABLE authentic (
> key hash NOT NULL UNIQUE DEFAULT gen_hash(32),
> and so every row would have a value.
Right, so the 910eb61b2 fix explains it. I guess I'd better
expand the release note entry, because we'd not foreseen this
particular failure mode.
> Is there a thread or link for this? Interested in the positive change that
> had this side effect.
You could look at the commit:
https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=910eb61b2
Our modern practice is for the commit log message to link to the mailing
list discussion that led up to the commit, and this one does so:
> Discussion: https://postgr.es/m/75a7b7483aeb331aa017328d606d568fc715b90d.camel@cybertec.at
That message says
>> Bisecting shows that the regression was introduced by commit 9f8377f7a2,
>> which introduced DEFAULT values for COPY FROM.
regards, tom lane