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: 28525.1247147903@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

Responses

Browse pgsql-novice by date

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