Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

From: Zhihong Yu <zyu(at)yugabyte(dot)com>
To: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)
Date: 2022-08-24 22:47:54
Message-ID: CALNJ-vQR+EmCConUkin8eQEO55XPpcbxSuE88X6F0SJ2F=T6pw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
I was looking at 0004-COPY_IGNORE_ERRORS.patch

+ * Ignore constraints if IGNORE_ERRORS is enabled
+ */
+static void
+safeExecConstraints(CopyFromState cstate, ResultRelInfo *resultRelInfo,
TupleTableSlot *myslot, EState *estate)

I think the existing ExecConstraints() can be expanded by
checking cstate->opts.ignore_errors so that it can selectively
ignore Constraint Violations.

This way you don't need safeExecConstraints().

Cheers

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2022-08-24 22:51:41 Re: shadow variables - pg15 edition
Previous Message Nathan Bossart 2022-08-24 22:17:23 Re: archive modules