Catch exceptions outside function

From: Roberto Grandi <roberto(dot)grandi(at)trovaprezzi(dot)it>
To: pgsql-admin(at)postgresql(dot)org
Subject: Catch exceptions outside function
Date: 2013-09-18 10:17:17
Message-ID: 452256586.387717.1379499437400.JavaMail.root@trovaprezzi.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


Dear all

I ask for your help cause I can't point out the solution to my problem on PG 8.3
I would catch an exception outside any function/procedure but directly within script.

BEGIN;

-- raise an exception code

EXCEPTION
WHEN 'exception_type'
THEN ROLLBACK;

COMMIT;

is it possible with PG 8.3?

Many thanks in advance.

Roberto

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Albe Laurenz 2013-09-18 10:41:01 Re: Catch exceptions outside function
Previous Message Kevin Grittner 2013-09-17 20:46:17 Re: Dumping a database that is not accepting commands?