CREATE OR REPLACE FUNCTION test_func()
RETURNS int AS
$$
declare x int; y int;
begin
x=1; -- here is '=', not ':=', why ?
y:=2;
return x+y;
end;
$$
LANGUAGE plpgsql VOLATILEselect test_func()
-----------------
3
RETURNS int AS
$$
declare x int; y int;
begin
x=1; -- here is '=', not ':=', why ?
y:=2;
return x+y;
end;
$$
LANGUAGE plpgsql VOLATILEselect test_func()
-----------------
3
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货