Page 1 of 1

PostgreSQL procedure parameters typecast

Posted: 11.04.2014, 17:12
by Zer0
I am using PostgreSQL 9.3 and ZEOS 7.1.3a stable. For example I have test function:

CREATE OR REPLACE FUNCTION vl_test(IN param1 integer, IN param2 varchar, IN param3 integer, IN param4 smallint, OUT param5 integer) ...

In delphi I am calling TZStoredProc with this code:

proc.ParamByName('param1').AsInteger := 1;
proc.ParamByName('oaram2').AsString := 'test string';
proc.ParamByName('param3').AsInteger := 1;
proc.ParamByName('param4').AsInteger := 1;
proc.ExecProc;

and getting EZSQLException with message:
"Function vl_test (integer, unknown, integer, integer) does not exist. Unable to identify function that satisfies the given argument types. You may need to add explicit typecast."

After searching internet I found article that says: PostgreSQL 9.3 has no auto typecast like older versions. So, to make stored procedure working it is necessary to use explicit typecast.
Is there any way to add explicit typecast to TZStoredProc params?