Re: how to call a stored function on conflict - Mailing list pgsql-admin

From David G. Johnston
Subject Re: how to call a stored function on conflict
Date
Msg-id CAKFQuwZdNYvFnYgwSNx=9sHogpiBdEOE0AyLLzyX38oz6HpsMA@mail.gmail.com
Whole thread Raw
In response to how to call a stored function on conflict  (Pepe TD Vo <pepevo@yahoo.com>)
Responses Re: how to call a stored function on conflict  (Pepe TD Vo <pepevo@yahoo.com>)
List pgsql-admin
On Tue, Oct 8, 2019 at 11:56 AM Pepe TD Vo <pepevo@yahoo.com> wrote:
ERROR: invalid input syntax for integer: "42P01" CONTEXT: PL/pgSQL function ecisdrdm.pr_mig_stg_application_cdim() line 41 at assignment SQL state: 22P02

You made an assumption that the error code was an integer.  As the error message is pointing out one possible value of the error code is "42P01" which is not an integer.  You need to fix your code to match reality - that the error code is an alphanumic.

may I know how to execute the stored function?

The fact that the function provoked an error means that it was executed.....

David J.

pgsql-admin by date:

Previous
From: Holger Jakobs
Date:
Subject: Re: how to call a stored function on conflict
Next
From: Gourish Singbal
Date:
Subject: AES Encryption with Initialization Vector