From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dirk Heinrichs <dirk.heinrichs@altum.de>
Cc: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.
Date: Thu, 04 Nov 2010 16:37:12 -0400
Message-ID: <458.1288903032@sss.pgh.pa.us> (raw)
In-Reply-To: <4CD2FE35.50702@altum.de>
References: <201011021514.oA2FE1FT054444@wwwmaster.postgresql.org>
<m2wrovz8bi.fsf@2ndQuadrant.fr>
<4CD1D141.7070108@altum.de>
<m2iq0eqecz.fsf@2ndQuadrant.fr>
<20091.1288842928@sss.pgh.pa.us>
<4CD2FE35.50702@altum.de>
Dirk Heinrichs <dirk.heinrichs@altum.de> writes:
> Am 04.11.2010 04:55, schrieb Tom Lane:
>> 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.
> Got the point. Here's another patch, hope my limited C skills are
> sufficient... Works here, at least.
Committed with minor cleanup.
> BTW: Is there a way to achieve the same in pure PL/pgSQL or PL/perl?
plpgsql doesn't have any facility for working with run-time-determined
column names. I think it wouldn't be too hard in plperl though.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, dirk.heinrichs@altum.de, dimitri@2ndQuadrant.fr
Subject: Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.
In-Reply-To: <458.1288903032@sss.pgh.pa.us>
References: <201011021514.oA2FE1FT054444@wwwmaster.postgresql.org> <m2wrovz8bi.fsf@2ndQuadrant.fr> <4CD1D141.7070108@altum.de> <m2iq0eqecz.fsf@2ndQuadrant.fr> <20091.1288842928@sss.pgh.pa.us> <4CD2FE35.50702@altum.de> <458.1288903032@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox