pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bradley Kieser <brad@kieser.net>
To: Michael Fuhr <mike@fuhr.org>
Cc: PgSQL ADMIN <pgsql-admin@postgresql.org>
Subject: Re: Script terminates even though ON_ERROR_STOP not set
Date: Fri, 14 Jan 2005 18:06:16 +0000
Message-ID: <41E80A18.3000808@kieser.net> (raw)
In-Reply-To: <20050114175422.GA18434@winnie.fuhr.org>
References: <41E7B4F6.8070505@kieser.net>
	<20050114175422.GA18434@winnie.fuhr.org>



Michael Fuhr wrote:

>On Fri, Jan 14, 2005 at 12:03:02PM +0000, Bradley Kieser wrote:
>
>  
>
>>I have an admin script that drops a schema and then recreates it (quick 
>>way to refresh from backup). However, if the schema doesn't exist, the 
>>drop errors, as you would expect. The next SQL command, the schema 
>>create, is never executed.
>>    
>>
>
>How do you know the create is never executed?  Are you looking for
>the schema and not finding it?  How are you looking?  Or is there
>an error message?  What is it?
>  
>
Looking for the schema and not finding it.

>Are you doing the drop and create in the same transaction?  If so,
>  
>
I have auto-commit on.

>then the drop statement's failure is preventing subsequent statements
>in that transaction from executing.  If that's not the problem then
>please post a self-contained test case so we can see exactly what
>you're doing.
>  
>
Hmm, maybe I need to explicitly call commit? Will try and get back to you.

>  
>
>>I do not have ON_ERROR_STOP set so why is this happening?
>>    
>>
>
>How do you know ON_ERROR_STOP isn't set?  Could it be set in
>a .psqlrc file?  What does \set show?
>
>  
>



view thread (7+ messages)  latest in thread

Message-ID: <41E80A18.3000808@kieser.net>
Permalink:  ../41E80A18.3000808@kieser.net/
Also on:    postgresql.org/message-id/41E80A18.3000808@kieser.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: brad@kieser.net, mike@fuhr.org
  Subject: Re: Script terminates even though ON_ERROR_STOP not set
  In-Reply-To: <41E80A18.3000808@kieser.net>
  References: <41E7B4F6.8070505@kieser.net> <20050114175422.GA18434@winnie.fuhr.org> <41E80A18.3000808@kieser.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox