I'm trying to add a data source to be used when creating SQL Views.
For this I have created, directly in the database, the following function:
create or replace FUNCTION cmf_certs_expiration_watch(OUT "Code" character varying, OUT
"ExpirationDate" date)
RETURNS SETOF record AS
$BODY$
BEGIN
RETURN QUERY EXECUTE
'select "Code", "ExpirationDate"
from "SSLCertificates" where "ExpirationDate" - integer' ||
quote_literal (180) ||
' > current_date';
END
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
COMMENT ON FUNCTION cmf_certs_expiration_watch() IS 'TYPE: function';
I have tested teh function from pslq and it works perfectly well with the class I want, but I cannot get it to appear in the list of data source. Iread about a bug in 2.1, but I'm using 2.3.
Could somebody please point to me where do I have to look? Thanks,
mari