写Postgres存储过程时,不晓得怎么讲select查出的值赋值给变量,今天知道了用select INTO
create or replace function "public"."getdescription"() returns varchar as
$body$
DECLARE
temp varchar;
BEGIN
select code into temp from cfvariable where id=223;
raise notice 'code %', temp;
return temp;
end
$body$
LANGUAGE 'plpgsql' volatile called on null input security invoker;