On 07/02/2008 15:30, Laurent Duperval wrote:
I am currently testing some SQL scripts and I want to run the entire script, even if there is an error in it. Currently, it stops when there is an error and does not execute any of the commands in the SQL file.
At a guess, I'd say that this is because of the way PostgreSQL works, not PgAdmin - when you execute a series of statements within a transaction, and one of them causes an error, no following statements will be executed until you ROLLBACK the transaction. Scripts from from the Query Editor in PgAdmin are run within a transaction, so this is the behaviour you are seeing.
If you want your script to continue after an error (and to be honest I can't think of many cases where you would :-) ) you should run it from psql, perhaps using the \i command (which runs the contents of an external file).
Ray. --------------------------------------------------------------- Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland [EMAIL PROTECTED] --------------------------------------------------------------- ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq