Re: [HACKERS] psql and libpq fixes

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [HACKERS] psql and libpq fixes
Дата
Msg-id Pine.GSO.4.02A.10002081233550.12742-100000@Krokodil.DoCS.UU.SE
обсуждение исходный текст
Ответ на Re: [HACKERS] psql and libpq fixes  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] psql and libpq fixes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, 7 Feb 2000, Tom Lane wrote:

> Peter Eisentraut <peter_e@gmx.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 ...

Oh yes, good point.

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

Last time I checked you couldn't roll back a create table. ;)

-- 
Peter Eisentraut                  Sernanders vaeg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] PostgreSQL 7 RPMs coming soon
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] How to make a patch?