pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: Raul Kaubi <raulkaubi@gmail.com>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: Error handling: Resume work after error
Date: Wed, 5 Feb 2020 16:03:50 +0100
Message-ID: <20200205150350.GA5752@depesz.com> (raw)
In-Reply-To: <CAO_+3-CKzP_hwuWqVx+-s1DXT4SzX-ohMd48QuziE0P1KQGCxQ@mail.gmail.com>
References: <CAO_+3-CKzP_hwuWqVx+-s1DXT4SzX-ohMd48QuziE0P1KQGCxQ@mail.gmail.com>

On Wed, Feb 05, 2020 at 04:17:09PM +0200, Raul Kaubi wrote:
> Let's say I want my procedure/function to resume work after specific error
> ( duplicate_table ).
> Is it possible to resume work after error..?
> EXCEPTION
> > WHEN duplicate_table then ......;

Sure you can:

https://www.postgresql.org/docs/current/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING

Best regards,

depesz






view thread (3+ messages)  latest in thread

Message-ID: <20200205150350.GA5752@depesz.com>
Permalink:  ../20200205150350.GA5752@depesz.com/
Also on:    postgresql.org/message-id/20200205150350.GA5752@depesz.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: depesz@depesz.com, raulkaubi@gmail.com
  Subject: Re: Error handling: Resume work after error
  In-Reply-To: <20200205150350.GA5752@depesz.com>
  References: <CAO_+3-CKzP_hwuWqVx+-s1DXT4SzX-ohMd48QuziE0P1KQGCxQ@mail.gmail.com> <20200205150350.GA5752@depesz.com>

* 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