Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 919DD2E010C for ; Thu, 27 Dec 2007 14:03:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 06095-10 for ; Thu, 27 Dec 2007 14:03:14 -0400 (AST) Received: from web31801.mail.mud.yahoo.com (web31801.mail.mud.yahoo.com [68.142.207.64]) by postgresql.org (Postfix) with SMTP id 7B5752E01E1 for ; Thu, 27 Dec 2007 14:03:14 -0400 (AST) Received: (qmail 18841 invoked by uid 60001); 27 Dec 2007 18:03:13 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=NdzXczLBAcx7AglNJVqNP9HFQNViVpOiEGWR/SOQoqxVOGO251vcTyCeE7vOco3q+CUb8oByYXaXs3UcMeeGW3TjusrgL55y82k5GpgwJUSs+Tfu5bzP9Z5UNynbh6Oh13VkZKIREfpHsNLtd1cBnNH+7dADYbmciebJKiyjfec=; X-YMail-OSG: bj2Eud0VM1kw3Dw5u37izZ4b9F1Hvb_Kc.H_SITyZWAH8acm1fEqJQw7w.9NVoPNi5xWYg-- Received: from [12.180.237.138] by web31801.mail.mud.yahoo.com via HTTP; Thu, 27 Dec 2007 10:03:13 PST X-Mailer: YahooMailWebService/0.7.162 Date: Thu, 27 Dec 2007 10:03:13 -0800 (PST) From: Richard Broersma Jr Subject: Re: Advice for generalizing trigger functions To: Erik Jones Cc: SQL Postgresql List In-Reply-To: <5DD016CF-7FDE-489F-B15A-58B6935B4FBD@myemma.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <276465.18598.qm@web31801.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/145 X-Sequence-Number: 29837 --- On Thu, 12/27/07, Erik Jones 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 components of the table that will also be needed in the SQL string that will be executed? Regards, Richard Broersma Jr.