postgres function takes parameter bytea while calling insted of varchar

264 Views Asked by At
ERROR:  function dharani.fn_generate_ror_1b_citizen(bytea, character varying) does not exist at character 15
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
STATEMENT:  select * from dharani.fn_generate_ror_1b_citizen($1,$2)

ERROR:  function dharani.fn_generate_pahani_citizen(bytea, bytea, character varying) does not exist at character 15
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
STATEMENT:  select * from dharani.fn_generate_pahani_citizen($1,$2,$3)
1

There are 1 best solutions below

0
On

You have to supply function arguments of the appropriate type, if necessary using type casts as the hint says.

SQL is a typed language, and PostgreSQL uses function overloading, so it is essential the data types are resolved properly. The exact rules how this is done are in the documentation.