pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Roberto Grandi <roberto.grandi@trovaprezzi.it>
To: pgsql-admin@postgresql.org
Subject: Catch exceptions outside function
Date: Wed, 18 Sep 2013 12:17:17 +0200 (CEST)
Message-ID: <452256586.387717.1379499437400.JavaMail.root@trovaprezzi.it> (raw)
In-Reply-To: <1725603904.387654.1379499282544.JavaMail.root@trovaprezzi.it>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (10+ messages)  latest in thread

Message-ID: <452256586.387717.1379499437400.JavaMail.root@trovaprezzi.it>
Permalink:  ../452256586.387717.1379499437400.JavaMail.root@trovaprezzi.it/
Also on:    postgresql.org/message-id/452256586.387717.1379499437400.JavaMail.root@trovaprezzi.it

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: roberto.grandi@trovaprezzi.it
  Subject: Re: Catch exceptions outside function
  In-Reply-To: <452256586.387717.1379499437400.JavaMail.root@trovaprezzi.it>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox