Re: Skipping errors when running scripts - Mailing list pgsql-novice

From Tom Lane
Subject Re: Skipping errors when running scripts
Date
Msg-id 28525.1247147903@sss.pgh.pa.us
Whole thread Raw
In response to Skipping errors when running scripts  (John Gardner <john.gardner@tagish.co.uk>)
Responses Setting up security for development  (Michael Gould <mgould@intermodalsoftwaresolutions.net>)
List pgsql-novice
John Gardner <john.gardner@tagish.co.uk> writes:
> For instance, when I run a script in SQL Server, and it comes across a
> problem e.g. It tries to drop a table that doesn't exist, it will notify
> me of the error, and then continue on.  With PostgreSQL (or at least
> running scripts in pgAdmin III) the script runs, comes across the error
> and then rolls back to before the script was run.

It sounds like you're running the script as a single transaction (ie,
inside a begin/commit block).  Don't do that if you don't want rollback.

I don't know pgAdmin well enough to know how to adjust its behavior
for running scripts, but there's probably a knob someplace.  Or use
plain psql.

            regards, tom lane

pgsql-novice by date:

Previous
From: John DeSoi
Date:
Subject: Re: Skipping errors when running scripts
Next
From: "Harsha Hegde"
Date:
Subject: Re: psql undefined symbol error on Ubuntu