程序:
CREATE OR REPLACE FUNCTION kappend(anynonarray, anyelement) RETURNS text AS
$$
SELECT $1 || $2;
$$ LANGUAGE SQL;
调用方法(错误):
pgsql=# select kappend('def','abc');
ERROR: could not determine polymorphic type because input has type "unknown"
pgsql=#
调用方法(正确):
pgsql=# select kappend('def'::text,'abc'::text);
kappend
---------
defabc
(1 row) pgsql=#