Re: how to call a stored function on conflict

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Pepe TD Vo <pepevo(at)yahoo(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: how to call a stored function on conflict
Date: 2019-10-08 19:29:46
Message-ID: CAKFQuwZdNYvFnYgwSNx=9sHogpiBdEOE0AyLLzyX38oz6HpsMA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, Oct 8, 2019 at 11:56 AM Pepe TD Vo <pepevo(at)yahoo(dot)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.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Gourish Singbal 2019-10-09 06:16:28 AES Encryption with Initialization Vector
Previous Message Holger Jakobs 2019-10-08 19:29:03 Re: how to call a stored function on conflict