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 5B3793A1CEF for ; Fri, 14 Jan 2005 18:13:52 +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 97953-02 for ; Fri, 14 Jan 2005 18:13:49 +0000 (GMT) Received: from laptop.kieser.net (kieser2.demon.co.uk [80.176.229.121]) by svr1.postgresql.org (Postfix) with ESMTP id 5105A3A1ADC for ; Fri, 14 Jan 2005 18:13:50 +0000 (GMT) Received: from [127.0.0.1] (laptop.kieser2.demon.co.uk [127.0.0.1]) by laptop.kieser.net (Postfix) with ESMTP id E386818333; Fri, 14 Jan 2005 18:14:15 +0000 (GMT) Message-ID: <41E80BF7.7000503@kieser.net> Date: Fri, 14 Jan 2005 18:14:15 +0000 From: Bradley Kieser User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en, en-us MIME-Version: 1.0 To: Michael Fuhr Cc: PgSQL ADMIN Subject: Re: Script terminates even though ON_ERROR_STOP not set References: <41E7B4F6.8070505@kieser.net> <20050114175422.GA18434@winnie.fuhr.org> In-Reply-To: <20050114175422.GA18434@winnie.fuhr.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.335 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200501/152 X-Sequence-Number: 16011 Michael, I didn't see the last comment in my previous replies. I know that the variable isn't set because I embedded \set into the psql commands so that they would output what is set. Thanks, Brad 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? > >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? > > >