From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | PostgreSQL Development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [HACKERS] psql and libpq fixes |
Date: | 2000-02-08 00:46:30 |
Message-ID: | 22504.949970790@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> While we're at it, there's a setting that causes psql to stop execution of
> a script on an error (since usually the later commands will be depending
> on the successful completion of earlier ones). I was wondering if that
> should be the default if you use the -f option.
Sounds useful, but you can't make it the default without breaking existing
scripts. Trivial example is this common idiom:
DROP TABLE t1; -- in case it already exists
CREATE TABLE t1;
COPY ...
In general, an existing script is not going to be written with the idea
that psql will cut it off at the knees for provoking an error. If the
author *does* want all the rest of the commands to be skipped on error,
he'll just have written BEGIN and END around the whole script.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Hiroshi Inoue | 2000-02-08 01:04:31 | RE: [HACKERS] TODO item |
Previous Message | Bruce Momjian | 2000-02-08 00:07:33 | Re: [HACKERS] TODO item |