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

Поиск
Список
Период
Сортировка
От Zhihong Yu
Тема Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)
Дата
Msg-id CALNJ-vQR+EmCConUkin8eQEO55XPpcbxSuE88X6F0SJ2F=T6pw@mail.gmail.com
обсуждение исходный текст
Ответ на POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)  (Alex Shulgin <ash@commandprompt.com>)
Список 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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: archive modules
Следующее
От: David Rowley
Дата:
Сообщение: Re: shadow variables - pg15 edition