Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 1643B1337B6E for ; Thu, 4 Nov 2010 05:18:56 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 22776-01 for ; Thu, 4 Nov 2010 08:18:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from acidenitrix.villemain.org (acidenitrix.villemain.org [91.121.90.165]) by mail.postgresql.org (Postfix) with ESMTP id 6D017133798F for ; Thu, 4 Nov 2010 05:18:48 -0300 (ADT) Received: from 89-158-241-48.rev.dartybox.com ([89.158.241.48] helo=DimIMac.local) by acidenitrix.villemain.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1PDv1t-0008Df-GC; Thu, 04 Nov 2010 09:18:41 +0100 Received: by DimIMac.local (Postfix, from userid 501) id EE0EA1132ACE; Thu, 4 Nov 2010 09:18:35 +0100 (CET) From: Dimitri Fontaine To: Tom Lane Cc: Dimitri Fontaine , Dirk Heinrichs , pgsql-bugs@postgresql.org Subject: Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones. Organization: 2ndQuadrant References: <201011021514.oA2FE1FT054444@wwwmaster.postgresql.org> <4CD1D141.7070108@altum.de> <20091.1288842928@sss.pgh.pa.us> User-Mail-Address: dimitri@2ndQuadrant.fr Date: Thu, 04 Nov 2010 09:18:35 +0100 In-Reply-To: <20091.1288842928@sss.pgh.pa.us> (Tom Lane's message of "Wed, 03 Nov 2010 23:55:28 -0400") Message-ID: User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201011/31 X-Sequence-Number: 28611 Tom Lane writes: > I don't actually see any point in having two functions at all. Since > the trigger is examining the column type internally, it could perfectly > well do the right thing at runtime depending on column type. Sorry, brain fart from me. Didn't realise we're talking about a trigger that looks at the column type here, it was a misplaced general advice. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support