| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
| Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgreSQL(dot)org> |
| Subject: | Re: [HACKERS] psql and libpq fixes |
| Date: | 2000-02-08 16:29:36 |
| Message-ID: | 2131.950027376@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
>> This does bring up a thought --- should psql's kill-the-script-on-error
>> option perhaps zap the script only for errors committed outside of a
>> transaction block?
> Why is being in a transaction block important?
I was thinking that the script might be expecting an error, and have
established a begin-block to limit the effects of the error.
But on third thought, probably the thing that would be really useful
for "expected errors" is if there is a backslash-command that turns on
or off the kill-on-error behavior. (The command line switch would
merely set the initial state of this flag.) This way, a script could
use the option in an intelligent fashion:
\kill-on-error off
DROP TABLE t1;
\kill-on-error on
CREATE TABLE t1;
...
It'd still have to default to 'off' for backwards compatibility,
unfortunately, but something like this would be really useful.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2000-02-08 16:38:02 | Re: [HACKERS] Ordering of pg_dump output |
| Previous Message | Vince Vielhaber | 2000-02-08 16:22:43 | Re: [HACKERS] New Globe |