On Fri, 2015-12-04 at 09:41 +0000, Tim Smith wrote: > Hi, > > When I use "preparedStatement.setString(5,ip);" to send values to a > stored function, it obviously gets sent to postgres as "character > varying". > > Postgres obviously complains loudly and says " Hint: No function > matches the given name and argument types. You might need to add > explicit type casts.". > > What is the appropriate workaround ? > > Thanks! > > Tim > > "preparedStatement.setString(5,ip);" will set parameter number five to the string held in the variable. That's what setString does. It expects a string to be passed. Your function's fifth IN argument needs to be defined as a "string". Within the function you will have to cast it to inet. HTH, Rob -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general