Re: Regression in COPY FROM caused by 9f8377f7a2

2023-10-01 Thread Laurenz Albe
On Sun, 2023-10-01 at 10:55 -0400, Andrew Dunstan wrote: > Thanks, pushed. Thanks for taking care of that. Yours, Laurenz Albe

Re: Regression in COPY FROM caused by 9f8377f7a2

2023-10-01 Thread Andrew Dunstan
On 2023-09-26 Tu 04:11, Laurenz Albe wrote: Here is an improved version of the patch with regression tests. Thanks, pushed. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com

Re: Regression in COPY FROM caused by 9f8377f7a2

2023-09-26 Thread Laurenz Albe
Here is an improved version of the patch with regression tests. Yours, Laurenz Albe From 71744ada1e2c8cfdbb57e03018572a1af623b09e Mon Sep 17 00:00:00 2001 From: Laurenz Albe Date: Tue, 26 Sep 2023 10:09:49 +0200 Subject: [PATCH] Evaluate defaults in COPY FROM only if necessary Since commit 9f837

Re: Regression in COPY FROM caused by 9f8377f7a2

2023-09-25 Thread Laurenz Albe
On Mon, 2023-09-25 at 17:49 -0400, Tom Lane wrote: > Andrew Dunstan 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, woul

Re: Regression in COPY FROM caused by 9f8377f7a2

2023-09-25 Thread Tom Lane
Andrew Dunstan 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

Re: Regression in COPY FROM caused by 9f8377f7a2

2023-09-25 Thread Andrew Dunstan
On 2023-09-25 Mo 11:06, Andrew Dunstan wrote: On 2023-09-25 Mo 04:59, Laurenz Albe wrote: On Mon, 2023-09-25 at 09:54 +0200, Laurenz Albe wrote: In v16 and later, the following fails: CREATE TABLE boom (t character varying(5) DEFAULT 'a long string'); COPY boom FROM STDIN; ERROR:  value to

Re: Regression in COPY FROM caused by 9f8377f7a2

2023-09-25 Thread Andrew Dunstan
On 2023-09-25 Mo 04:59, Laurenz Albe wrote: On Mon, 2023-09-25 at 09:54 +0200, Laurenz Albe wrote: In v16 and later, the following fails: CREATE TABLE boom (t character varying(5) DEFAULT 'a long string'); COPY boom FROM STDIN; ERROR:  value too long for type character varying(5) In PostgreS

Re: Regression in COPY FROM caused by 9f8377f7a2

2023-09-25 Thread Laurenz Albe
On Mon, 2023-09-25 at 09:54 +0200, Laurenz Albe wrote: > In v16 and later, the following fails: > > CREATE TABLE boom (t character varying(5) DEFAULT 'a long string'); > > COPY boom FROM STDIN; > ERROR:  value too long for type character varying(5) > > In PostgreSQL v15 and earlier, the COPY sta

Regression in COPY FROM caused by 9f8377f7a2

2023-09-25 Thread Laurenz Albe
In v16 and later, the following fails: CREATE TABLE boom (t character varying(5) DEFAULT 'a long string'); COPY boom FROM STDIN; ERROR: value too long for type character varying(5) In PostgreSQL v15 and earlier, the COPY statement succeeds. The error is thrown in BeginCopyFrom in line 1578 (HE