Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.
Date
Msg-id 458.1288903032@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.  (Dirk Heinrichs <dirk.heinrichs@altum.de>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Dirk Heinrichs
Date:
Subject: Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.
Next
From: "Henry C."
Date:
Subject: Re: BUG #5736: 9.0.1 segmentation fault (sig11) during long-lived update