Error handling in PL/PgSQL (without execution termination)

Started by Allan Kamauover 15 years ago3 messagesgeneral
Jump to latest
#1Allan Kamau
kamauallan@gmail.com

I am searching for the resource that explains how to handle SQL
related exceptions in PL/PgSQL without letting the function's
execution terminate.
I would like to use his to address possible UNIQUE constraint
violation (and resulting exception) attributed to multiple clients
concurrently populating the given table.

Allan.

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: Allan Kamau (#1)
Re: Error handling in PL/PgSQL (without execution termination)

Hello

http://www.postgresql.org/docs/9.0/interactive/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING

Regards

Pavel Stehule

2010/12/9 Allan Kamau <kamauallan@gmail.com>:

Show quoted text

I am searching for the resource that explains how to handle SQL
related exceptions in PL/PgSQL without letting the function's
execution terminate.
I would like to use his to address possible UNIQUE constraint
violation (and resulting exception) attributed to multiple clients
concurrently populating the given table.

Allan.

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

#3Allan Kamau
kamauallan@gmail.com
In reply to: Pavel Stehule (#2)
Re: Error handling in PL/PgSQL (without execution termination)

Thanks Pavel, this is exactly what I have been looking for.

Allan

Show quoted text

On Thu, Dec 9, 2010 at 8:44 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:

Hello

http://www.postgresql.org/docs/9.0/interactive/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING

Regards

Pavel Stehule

2010/12/9 Allan Kamau <kamauallan@gmail.com>:

I am searching for the resource that explains how to handle SQL
related exceptions in PL/PgSQL without letting the function's
execution terminate.
I would like to use his to address possible UNIQUE constraint
violation (and resulting exception) attributed to multiple clients
concurrently populating the given table.

Allan.

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