Thanks to visit codestin.com
Credit goes to postgrespro.com

Re: [PATCHES] Continue transactions after errors in psql - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: [PATCHES] Continue transactions after errors in psql
Date
Msg-id [email protected]
Whole thread Raw
In response to Re: [PATCHES] Continue transactions after errors in psql  (Tom Lane <[email protected]>)
Responses Re: [PATCHES] Continue transactions after errors in psql
List pgsql-hackers

Tom Lane wrote:

>Andrew Dunstan <[email protected]> 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.
>
>

I meant it's a lot to type ;-)

>
>
>>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.
>
>
>
>

True. I wasn't suggesting it as an alternative in the general case. I
still think it's worth doing, though - I have often seen it requested
and can't think of a compelling reason not to provide it. But maybe
that's off topic ;-)

cheers

andrew

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] Continue transactions after errors in psql
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] Continue transactions after errors in psql