Function is giving execution error from inside the procedure

From: M Sarwar <sarwarmd02(at)outlook(dot)com>
To: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Function is giving execution error from inside the procedure
Date: 2024-02-02 15:04:27
Message-ID: DM4PR19MB5978608EBC715899904285D2D3422@DM4PR19MB5978.namprd19.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

I am trying to create a simple procedure to updata a table.

CREATE OR REPLACE PROCEDURE bronxdev.pr_asn_wafer_id_update(

)

LANGUAGE 'plpgsql'

AS $BODY$

DECLARE

begin

UPDATE BRONXDEV.ASN_MANUFACTURER_PROFILE

SET WAFER_ID = BRIM(SERIAL_ID, '/')

;

commit;

--rollback;

END

$BODY$;

It is getting compiled without any issue but when I am trying to execute, I am getting BRIM function does not exist error message.

I have tried to google and few other resources and did not help.

Error: ERROR: function brim(character varying, unknown) does not exist LINE 2: SET WAFER_ID = BRIM(SERIAL_ID, '/')

The same UPDATE is directly working from the pgadmin.

I have tried to change LANGUAGE from plpgsql to SQL and that did not help.

My postgres version is 13.2.

Thanks,

Sarwar

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2024-02-02 15:30:08 Re: Function is giving execution error from inside the procedure
Previous Message Olivier Gautherot 2024-02-02 15:02:03 Re: Enhancement Request