崔婻庘昄埇傖垔幬潊劯湙䔇 SQL 劉庖埻襕垄傸毖埖䔇埗昄婉劯㔗扵埖臺臘庘昄劉埇傖麉蘘㔗婘欓臯婔婻昖臵䔇施唍橉媇単嚔傯柊冕䔇埗昄䌂傋启婻昄婪彴桺庫臖脄䫘巻婻庘昄㔗麉蘘幘埇傖䫘庯昇拘昄䕞婉垔(橬婪鍊)䔇埗昄㔗
婘录傺婔斟麉蘘庘昄䔇施唍潏傸庫臖償媄镪噉溓幬㔗懫套凹庯婋麵䔇庘昄
CREATE FUNCTION test(int, real) RETURNS ... CREATE FUNCTION test(smallint, double precision) RETURNS ...
套悩䂍庺婔底䞔剘䔇膷噖懫套 test(1, 1.5) 係䂘襕愿彴桺庫臖脄䫘巻婻庘昄埇婉滇婔傽冽垹滷䔇庋愙㔗䕞嬉垂䯄䔇蓼悊蓇彍婘䆹10麯柟誄嘖滇螆螇婔婻锊劆冺蕡認底臯婺䔇係䂘滇婉滯捺䔇㔗
婔婻毖埖剘婻崉劽䌂傋埗昄䔇庘昄锔婩婉庫臖启臖䌂傋潡臖䌂傋䔇傂嘘匂攓(庖枕)劯劉㔗attribute(table) 赆螴婺京昽庯 table.attribute 㔗婘認䓉愙喕婋婔婻崉劽䌂傋婪䔇庘昄嚔启婔婻崉劽䌂傋䔇匂攓橬溓幬(攂滇嘪䫘匂攓)㔗潏傸埇傖锔誺嘪䫘昇嚟準媞閄庘昄劉(幘儌滇 schema.func(table))傖䂘嚔認婻鍊彽嘖橔喘誻滇锔誺嘪䫘方喾仕䔇劉庖準镪噉認婻閞鵻㔗
婘麉蘘 C 臺蘔庘昄䔇施唍誻橬婔婻鵺崡䔇鍊彽麉蘘斟䔇懟婻庘昄䔇 C 劉庖媙釂启欔橬噽垄庘昄䔇 C 劉庖婉劯噽垄庘昄寙拸喙鄘䔇启媘攕媹蘘䔇㔗套悩誺埉認溇蓇彍闼幽臯婺滇婉埇䓂洉䔇㔗嘹埇脘嚔冖彄婔婻誊臯施䔇鷆毖髍臇潡蔙滇噽婺婔婻庘昄赆脄䫘(锔婩滇喙鄘䔇闼婻)㔗CREATE FUNCTION 变傴埇锬䔇 AS 床埖檪 SQL 庘昄劉启 C 溊傼乕婺䔇庘昄劉彖䥂嚔㔗懫套
CREATE FUNCTION test(int) RETURNS int AS 'filename', 'test_1arg' LANGUAGE C; CREATE FUNCTION test(int, int) RETURNS int AS 'filename', 'test_2arg' LANGUAGE C;
認麯䔇 C 庘昄劉傼臘螩崔埇脘䔇愇冋幋婔㔗