%TYPE声明变量 CREATE OR REPLACE PROCEDURE testatlasdb() AS $$ DECLARE sss emp.ename%TYPE; BEGIN SELECT ENAME INTO sss FROM EMP LIMIT 1 ; RAISE NOTICE '%',sss; END; $$ LANGUAGE plpgsql; atlasdb=# call testatlasdb(); NOTICE: SMITH CALL