Re: Substitute of TRY and CATCH in postgres

From: Thomas Kellerer <shammat(at)gmx(dot)net>
To: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: Re: Substitute of TRY and CATCH in postgres
Date: 2021-04-19 13:32:41
Message-ID: 0fde17f1-3d4c-451a-6746-52ec16d16155@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

aditya desai schrieb am 19.04.2021 um 15:21:
> We have a MSSQL proc which reads as below. We have to convert it to
> Postgres using TRY CATCH. I googled about it and could not find
> significant information. Can someone help?
You need an exception block:

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Rein Petersen 2021-05-11 22:43:44 set Assert checking on by session
Previous Message aditya desai 2021-04-19 13:21:53 Substitute of TRY and CATCH in postgres