我正在使用PostgreSQL上的表格返回函数(使用pgAdmin 4)。它曾经工作得很好,但由于某种原因,我得到试图修改功能时,此错误消息:postgresql截断字符串
ERROR: type "TABLE(id integer, id_scenario integer, date_valid timestamp wit" does not exist NOTICE: identifier "TABLE(id integer, id_scenario integer, date_valid timestamp without time zone, dni_q95 double precision, csp_forecast_q95 double precision, storage_q95 double precision)" will be truncated to "TABLE(id integer, id_scenario integer, date_valid timestamp wit"
我明白了一个标识符不能超过63个字节,所以我的代码行被截断。我会很感激,如果有人可以帮助我在这2个问题:
为什么这条线突然公认的标识?
如何解决这个问题,知道我需要返回所有这些列?
下面是函数体:
CREATE OR REPLACE FUNCTION public.csp_park_95(id_park integer)
RETURNS SETOF "TABLE(id integer, id_scenario integer, date_valid
timestamp without time zone, dni_q95 double precision, csp_forecast_q95
double precision, storage_q95 double precision)"
LANGUAGE 'sql'
COST 100.0
VOLATILE
ROWS 1000.0
AS $function$
-- irrelevant code
$function$;
ALTER FUNCTION public.csp_park_95(integer)
OWNER TO "POC_kacare_admin";
“*?为什么这条线突然公认的标识符” *因为双引号是标识符:https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS –