| From: | shihao zhong <zhong950419(at)gmail(dot)com> |
|---|---|
| To: | li(dot)evan(dot)chao(at)gmail(dot)com |
| Cc: | michael(at)paquier(dot)xyz, jiezhilove(at)126(dot)com, gowdham(dot)m(at)zohocorp(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Fix stale column context after COPY FROM conversion errors |
| Date: | 2026-11-08 02:56:39 |
| Message-ID: | CAGRkXqSQFUOZ7L2V7u8xD_fLTGX+WLhX0=y5Mf0+hnwNP+aJ7g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Chao,
Thanks for working on this.
2 interesting points.
1. V2 also fixes the crash Gowdham reported [1]. The committed fix
got reverted recently [2].
2. A CHECK error after set_null names the nulled column instead of
the row.
CREATE TABLE r3 (a int CHECK (a > 0), b int);
COPY r3 FROM STDIN WITH (delimiter ',', on_error set_null);
-1,bad
Without v2 CONTEXT: COPY r3, line 1, column b: "bad"
With v2 CONTEXT: COPY r3, line 1: "-1,bad"
[1]
https://postgr.es/m/1a181ff6be8.6d14feb261368.4036709598649280477@zohocorp.com
[2] https://git.postgresql.org/pg/commitdiff/c07545dfe1a
Thanks,
Shihao
| From | Date | Subject | |
|---|---|---|---|
| Next Message | shihao zhong | 2026-11-08 03:42:22 | Re: Partitioned index marked valid while a partition is pending detach |
| Previous Message | best xmg | 2026-11-08 02:19:00 | Re: Hash a ScalarArrayOpExpr whose array is fixed for one execution |