BUG #16796: Issue While passing null as value during procedure/Function Call from Groovy

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: jeevitha(dot)manickavasagam(at)gmail(dot)com
Subject: BUG #16796: Issue While passing null as value during procedure/Function Call from Groovy
Date: 2020-12-29 15:34:52
Message-ID: 16796-f0fe07c5b34f656b@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16796
Logged by: Jeevitha Manickavasagam
Email address: jeevitha(dot)manickavasagam(at)gmail(dot)com
PostgreSQL version: 12.3
Operating system: 64-bit Operating system
Description:

Issue While passing null as value during procedure/Function Call from
Groovy.
We have a below Procedure in Postgresql

CREATE OR REPLACE PROCEDURE schemaname.procedurename(
INOUT out_ctid integer DEFAULT NULL::integer,
in_ctname character varying DEFAULT NULL::character varying,
in_address1 character varying DEFAULT NULL::character varying,
in_address2 character varying DEFAULT NULL::character varying,
in_address3 character varying DEFAULT NULL::character varying,
in_address4 character varying DEFAULT NULL::character varying)
LANGUAGE 'plpgsql'
AS $BODY$
BEGIN
INSERT INTO schemaname.tablename (ctid_new, ctname, address1, address2,
address3, address4)
VALUES (nextval('schemaname.ct_sq'), in_ctname, in_address1,
in_address2, in_address3, in_address4,);
out_ctid := currval('schemaname.ct_sq');
END;
$BODY$;

We are facing Calling this procedure from Groovy ( using
postgresql-42.2.14.jar and also replaced with latest jar -
postgresql-42.2.18.jar)

Below is our calling statement
sql.call("call
schemaname.procedurename(${​​​​​​​​Sql.INTEGER}​​​​​​​​,$ctName,$address1,$address2,$address3,$address4)")
//values of all address variables are null

we are getting the below error

SQL Exception: ERROR: procedure schemaname.procedurename(character varying,
unknown, unknown, unknown, unknown) does not exist
Hint: No procedure matches the given name and argument types. You might
need to add explicit type casts.
Position: 6

Browse pgsql-bugs by date

  From Date Subject
Next Message Jordan Lewis 2020-12-30 02:53:35 DROP FUNCTION RESTRICT drops GENERATED columns
Previous Message Max Vikharev 2020-12-29 11:17:51 Re: BUG #16691: Autovacuum stops processing certain databases until postgresql rebooted