Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 6FB5B1DCB2B1 for ; Mon, 27 Feb 2012 16:54:19 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S27aM-0003rN-8h for pgsql-hackers@postgresql.org; Mon, 27 Feb 2012 20:54:18 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q1RKrwwW018853; Mon, 27 Feb 2012 15:53:58 -0500 (EST) To: Dimitri Fontaine cc: Thom Brown , PostgreSQL Hackers Subject: Re: Command Triggers, patch v11 In-reply-to: References: Comments: In-reply-to Dimitri Fontaine message dated "Mon, 27 Feb 2012 20:31:45 +0100" Date: Mon, 27 Feb 2012 15:53:58 -0500 Message-ID: <18852.1330376038@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/1340 X-Sequence-Number: 203704 Dimitri Fontaine writes: > Thom Brown writes: >> I've got a question regarding the function signatures required for >> command triggers, and apologies if it's already been discussed to >> death (I didn't see all the original conversations around this). >> These differ from regular trigger functions which don't require any >> arguments, and instead use special variables. Why aren't we doing the >> same for command triggers? So instead of having the parameters > Basically so that we don't have to special code support for each and > every language out there. FWIW, I agree with Thom on this. If we do it as you suggest, I confidently predict that it will be less than a year before we seriously regret it. Given all the discussion around this, it's borderline insane to believe that the set of parameters to be passed to command triggers is nailed down and won't need to change in the future. As for special coding of support, it hardly seems onerous when every language that has triggers at all has got some provision for the existing trigger parameters. A bit of copying and pasting should get the job done. regards, tom lane