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

Re: Skipping errors when running scripts

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Gardner <john(dot)gardner(at)tagish(dot)co(dot)uk>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Skipping errors when running scripts
Date: 2009-07-09 13:58:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
John Gardner <john(dot)gardner(at)tagish(dot)co(dot)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

In response to


pgsql-novice by date

Next:From: Harsha HegdeDate: 2009-07-09 14:57:00
Subject: Re: psql undefined symbol error on Ubuntu
Previous:From: John DeSoiDate: 2009-07-09 13:24:53
Subject: Re: Skipping errors when running scripts

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