Re: [SQL] Advice for generalizing trigger functions

2007-12-27 Thread Erik Jones
On Dec 27, 2007, at 12:03 PM, Richard Broersma Jr wrote: --- On Thu, 12/27/07, Erik Jones <[EMAIL PROTECTED]> wrote: TG_TABLE_NAME will have the name of the table the trigger was fired on. With that and using EXECUTE for your INSERT statements, you'll probably be set. True the table name

Re: [SQL] Advice for generalizing trigger functions

2007-12-27 Thread Richard Broersma Jr
--- On Thu, 12/27/07, Erik Jones <[EMAIL PROTECTED]> wrote: > TG_TABLE_NAME will have the name of the table the trigger > was fired on. With that and using EXECUTE for your INSERT > statements, you'll probably be set. True the table name is the easy part, but how do I determine the Primary Key

Re: [SQL] Advice for generalizing trigger functions

2007-12-27 Thread Erik Jones
On Dec 25, 2007, at 6:20 PM, Richard Broersma Jr wrote: I've created quite a few functions that log modifications to various history tables. (the history table has the same name as the base table but is prefixed by the 'History.' schema.) The only difference between functions I can find is