Is it possible to register a custom function written in database & written in extended hibernate Postgres Dialect as follows? Receiving function not exists exception on using this function in HQL.
Postgres function:
create or replace function ADD_DAYS(varDate timestamp without time zone, varNumber numeric)
returns timestamp without time zone
LANGUAGE sql AS
$$
SELECT (varDate + varNumber * INTERVAL '1 day')
$$;
Java code:
registerFunction("add_days", new SQLFunctionTemplate(StandardBasicTypes.DATE, "add_days(?1 , ?2)"));
hibernate.connection.url? Do you usehibernate.default_schema?