ファンクション作成作成CREATE OR REPLACE FUNCTION myfunc(num int) RETURNS int AS $$ DECLARE ret int; BEGIN ret = num + 1; RETURN ret; END; $$ LANGUAGE plpgsql; 利用SELECT myfunc( 100 ); 確認SELECT proname, prosrc FROM pg_proc WHERE proname = 'myfunc'; 削除DROP FUNCTION myfunc( int ); 参考 |
|