ALTER FUNCTION name ( [ [ argmode ] [ argname ] argtype [, ...] ] ) action [, ... ] [ RESTRICT ] ALTER FUNCTION name ( [ [ argmode ] [ argname ] argtype [, ...] ] ) RENAME TO new_name ALTER FUNCTION name ( [ [ argmode ] [ argname ] argtype [, ...] ] ) OWNER TO new_owner ALTER FUNCTION name ( [ [ argmode ] [ argname ] argtype [, ...] ] ) SET SCHEMA new_schema 認麯䔇 action 滇套婋幋婔 CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT IMMUTABLE | STABLE | VOLATILE [ EXTERNAL ] SECURITY INVOKER | [ EXTERNAL ] SECURITY DEFINER
ALTER FUNCTION 媞櫹婔婻庘昄䔇垔幬㔗
襕嘪䫘 ALTER FUNCTION 嘹媙釂拖橬臖庘昄㔗襕媞櫹婔婻庘昄䔇昇嚟嘹誻媙釂婘桄昇嚟婪拖橬 CREATE 溄鍊㔗襕媞櫹欔橬蔙嘹誻媙釂滇桄䔇欔橬蓐謾䔇䕘毖潡閘毖潊叻幽婫臖潊叻媙釂婘溴庘昄䔇昇嚟婪橬 CREATE 溄鍊㔗認底鍊彽嚺彽庖媞櫹臖欔橬蔙婉嚔啔傂嘘锔誺役鍴启麉傺庘昄婉脘啔䔇庋愙㔗婉誺轙亓䫘潙埇傖傖傂嘘桹嚟媞櫹傂懟庘昄䔇欔橬溄㔗
婔婻䯄橬䔇庘昄劉庖(埇傖橬昇嚟媞閄)
埗昄䔇昇嚟埇傖滇 IN(䚺䩕), OUT, INOUT 幋婔㔗臙婂懟 ALTER FUNCTION 垂鍙婉嚔濘懟傂嘘 OUT 埗昄啹婺彴桺庘昄䔇躆傘埻驔襕膷噖埗昄㔗啹溴彖庺 IN 启 INOUT 埗昄儌轿崘庖㔗
埗昄䔇劉庖㔗臙濘懟 ALTER FUNCTION 垂鍙婪婉嚔濘懟埗昄䔇劉庖啹婺埻橬埗昄䔇昄扞䌂傋䫘庯彴桺庘昄䔇躆傘㔗
套悩橬䔇臺滇臖庘昄埗昄䔇昄扞䌂傋(埇傖䫘昇嚟媞閄)㔗
庘昄䔇桄劉庖
庘昄䔇桄欔橬蔙㔗臙濘懟套悩庘昄湺螄婺 SECURITY DEFINER 闼幽垄锟劯儖傖桄䔇欔橬蔙欓臯㔗
庘昄䔇桄昇嚟
CALLED ON NULL INPUT 檪庘昄櫹潊婘欔橬埗昄鄘滇 NULL 䔇施唍幘嚔脄䫘垄㔗RETURNS NULL ON NULL INPUT 潡 STRICT 檪庘昄櫹潊套悩傂嘘婔婻埗昄滇 NULL 儌湹橸婉欓臯幽婫躻媘誫啂 NULL 㔗埗黙 CREATE FUNCTION 诙埡敘崔媇敇㔗
檪庘昄䔇滷崌匂攓媞櫹婺毺垔䌂傋㔗埗黙 CREATE FUNCTION 诙埡䂖誗㔗
媞櫹庘昄䔇垬噘攓垔幬湺臖垄滇劥滇垬噘垔幬単㔗庺庯噚垹 SQL 湺庖噿髞庖 EXTERNAL 儖赆媘䘖㔗埗黙 CREATE FUNCTION 诙埡敘崔橬噿認婻媘脘䔇媇敇㔗
啹噚垹 SQL 湺庖蔯媘䘖
檪埗昄䌂傋婺 integer 䔇庘昄 sqrt 麉变劉婺 square_root
ALTER FUNCTION sqrt(integer) RENAME TO square_root;
檪埗昄䌂傋婺 integer 䔇庘昄 sqrt 䔇欔橬蔙媞櫹婺 joe
ALTER FUNCTION sqrt(integer) OWNER TO joe;
檪埗昄䌂傋婺 integer 䔇庘昄 sqrt 䔇昇嚟媞櫹婺 maths
ALTER FUNCTION sqrt(integer) SET SCHEMA maths;