Logstash传递请求类型:
SELECT * from dbmon_stat_activity()
我在日志中出现错误:
[2018-07-02T14:00:00,384][WARN ][logstash.inputs.jdbc ] Exception when executing JDBC query {:exception=>#<Sequel::DatabaseError: Java::OrgLogstash::MissingConverterException: Missing Converter handling for full class name=org.postgresql.util.PGobject, simple name=PGobject>}
此查询调用的函数:
CREATE OR REPLACE FUNCTION public.dbmon_stat_activity()
RETURNS SETOF pg_stat_activity
LANGUAGE plpgsql
SECURITY DEFINER
AS $function$
DECLARE
rcrd RECORD;
BEGIN
FOR rcrd IN SELECT * FROM pg_stat_activity
LOOP
RETURN NEXT rcrd;
END LOOP;
RETURN;
END;
$function$
根据所写的here和here,我需要选择表中的数据类型。 如何在函数中完成此操作,或者有必要编辑表?
此查询后: https://pastebin.com/Lt5Lgdek
下一个错误类型:
[2018-07-02T14:00:00,388][WARN ][logstash.inputs.jdbc ] Exception when executing JDBC query {:exception=>#<Sequel::DatabaseError: Java::OrgLogstash::MissingConverterException: Missing Converter handling for full class name=org.postgresql.util.PGInterval, simple name=PGInterval>}
如果您手动执行此查询,则一切正常,没有错误。 此错误与JDBC有关吗? 有驱动程序的其他版本吗?
提前谢谢