Skip site navigation (1) Skip section navigation (2)

prevent psql script execution from stopping

From: Horst Herb <hherb(at)malleenet(dot)net(dot)au>
To: "Pgsql-Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: prevent psql script execution from stopping
Date: 2001-11-29 21:51:06
Message-ID: 20011129214526.12576.qmail@gnumed.dhs.org (view raw or flat)
Thread:
Lists: pgsql-novice
How  do I stop psql from bailing out of script executionwhen I attempt to 
drop a non-existing table?

I thought "\set ON_ERROR_STOP 0" would do, but it doesn't.

example:
\set ON_ERROR_STOP 0
drop table foo;
create table foo(baz text);

never executes the create statement if table foo didn't exist

Horst

pgsql-novice by date

Next:From: Francisco ReyesDate: 2001-11-29 23:03:27
Subject: Learning to read explain
Previous:From: Brian McCaneDate: 2001-11-29 20:13:13
Subject: Re: Vacuum

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group