Re: [HACKERS] Continue transactions after errors in psql

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Continue transactions after errors in psql
Дата
Msg-id 2246.1114528791@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Continue transactions after errors in psql  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: [HACKERS] Continue transactions after errors in psql
Список pgsql-patches
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> I would far rather see people code explicit markers around statements
>> whose failure can be ignored.  That is, a script that needs this
>> behavior ought to look like
>>
>> BEGIN;
>> \begin_ignore_error
>> DROP TABLE foo;
>> \end_ignore_error
>> CREATE ...
>> ...
>> COMMIT;

> That's a lot of work.

How so?  It's a minuscule extension to the psql patch already coded:
just provide backslash commands to invoke the bits of code already
written.

> In this particular case I would actually like to
> see us provide "DROP IF EXISTS ..." or some such.

That's substantially more work, with substantially less scope of
applicability: it would only solve the issue for DROP.

            regards, tom lane

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: [HACKERS] Continue transactions after errors in psql
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Cleaning up unreferenced table files