X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 120493A192C for ; Fri, 14 Jan 2005 17:54:47 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 95837-03 for ; Fri, 14 Jan 2005 17:54:31 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 5DF3E3A1CFB for ; Fri, 14 Jan 2005 17:54:28 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.1/8.13.1) with ESMTP id j0EHsM1F054605 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 14 Jan 2005 10:54:24 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.1/8.13.1) with ESMTP id j0EHsMeV018514; Fri, 14 Jan 2005 10:54:22 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.1/8.13.1/Submit) id j0EHsMu7018513; Fri, 14 Jan 2005 10:54:22 -0700 (MST) (envelope-from mfuhr) Date: Fri, 14 Jan 2005 10:54:22 -0700 From: Michael Fuhr To: Bradley Kieser Cc: PgSQL ADMIN Subject: Re: Script terminates even though ON_ERROR_STOP not set Message-ID: <20050114175422.GA18434@winnie.fuhr.org> References: <41E7B4F6.8070505@kieser.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41E7B4F6.8070505@kieser.net> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/149 X-Sequence-Number: 16008 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? Are you doing the drop and create in the same transaction? If so, 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. > 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? -- Michael Fuhr http://www.fuhr.org/~mfuhr/