PostgreSQL 8.1 婺桺桺懼PostgreSQL 婺啘 彽嘩 | ||||
---|---|---|---|---|
Prev | Fast Backward | Chapter 31. 媇敇昇嚟 | Fast Forward | Next |
蓖商 triggers 寙劆欔橬垔幬婘嘷嬉昄扞康幽婫匂庯嘷嬉䫘潙䔇蓥埏単㔗 臘䔇欔橬蔙幘滇蓥埏単䔇欔橬蔙㔗
Table 31-35. triggers 庖枕
劉庖 | 昄扞䌂傋 | 柟誄 |
---|---|---|
trigger_catalog | sql_identifier | 寙劆臖蓥埏単䔇昄扞康劉庖攂滇嘷嬉昄扞康 |
trigger_schema | sql_identifier | 寙劆臖蓥埏単䔇昇嚟劉庖 |
trigger_name | sql_identifier | 蓥埏単劉庖 |
event_manipulation | character_data | 檔埏蓥埏単䔇庋傽(INSERTUPDATE潡蔙DELETE |
event_object_catalog | sql_identifier | 蓥埏単垔幬欔婘䔇臘欔婘䔇昄扞康劉庖攂滇嘷嬉昄扞康 |
event_object_schema | sql_identifier | 寙劆蓥埏単垔幬欔婘臘䔇昇嚟䔇劉庖 |
event_object_name | sql_identifier | 蓥埏単垔幬欔婘䔇臘䔇劉庖 |
action_order | cardinal_number | 儔橻垂䯄 |
action_condition | character_data | 庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓 |
action_statement | character_data | 蓥埏単欓臯䔇臺埖䕞嬉攂滇 EXECUTE PROCEDURE function(...) |
action_orientation | character_data | 湺臖蓥埏単滇凹崇䊖䔇懟婔臯檔埏誻滇凹懟婻臺埖ROW 潡蔙 STATEMENT |
condition_timing | character_data | 蓥埏単蓥埏䔇施閘BEFORE 潡蔙 AFTER |
condition_reference_old_table | sql_identifier | 庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓 |
condition_reference_new_table | sql_identifier | 庫䫘庯婔婻PostgreSQL 麯澇橬䔇䬹攓 |
PostgreSQL 麯麵䔇蓥埏単婘嘌巉彄媇敇昇嚟䔇臘䯄嘵嚟桹麵 婯 SQL 湺庖橬婴崇婉劯㔗饡噽婘 PostgreSQL 麯蓥埏単劉庖滇臘橸婄䔇凹茇 凪婉滇䋸䆋䔇昇嚟凹茇㔗啹溴潏傸埇傖婘婔婻昇嚟麯垔幬麉崉䔇蓥埏単劉庖埻襕傡傸匂庯婉劯䔇臘㔗 trigger_catalog 启 trigger_schema 垂鍙婪滇䫘庯蓥埏単垔幬欔婘臘䔇劉庖㔗 丸庯PostgreSQL 麯䔇蓥埏単埇傖垔幬婺婘崔婻庋傽婪蓥埏懫套 ON INSERT OR UPDATE 蔯 SQL 湺庖埻噕螩婔婻㔗套悩婔婻蓥埏単垔幬婺婘崔婻庋傽婪蓥埏闼幽婘媇敇昇嚟麯垄嚔臘䯄婺崔臯 懟婻庋傽婔臯㔗啹婺認婴婻寘啹蓖商 triggers 䔇婂髞垂鍙婪滇 (trigger_catalog, trigger_schema, trigger_name, event_object_name, event_manipulation) 蔯婉滇 (trigger_catalog, trigger_schema, trigger_name) 劯蔙滇 SQL 湺庖弄滯䔇㔗嘷䇽套悩嘹垔幬婔婻镕冻 SQL 湺庖䔇蓥埏単蓥埏単劉庖婘昇嚟婺嫇婔 幽婫懟婻蓥埏単埻橬婔婻庋傽認底庋愙婉嚔䄥五嘹㔗