Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: "Dirk Heinrichs" <dirk(dot)heinrichs(at)altum(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.
Date: 2010-11-02 22:09:37
Message-ID: m2wrovz8bi.fsf@2ndQuadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Dirk Heinrichs" <dirk(dot)heinrichs(at)altum(dot)de> writes:
> The moddatetime function provided by this module only works on columns of
> type "timestamp without time zone". Would be nice if it could also provide
> an analogous function moddatetime_tz which provides the same functionality
> for columns of type "timestamp with time zone".

dim=# select pg_typeof('now'::timestamp), pg_typeof('now'::timestamptz);
pg_typeof | pg_typeof
-----------------------------+--------------------------
timestamp without time zone | timestamp with time zone
(1 row)

So I guess that you need to modify very little code to get the trigger
to work for both types.

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jon Nelson 2010-11-02 22:17:00 Re: [PERFORM] typoed column name, but postgres didn't grump
Previous Message Kevin Grittner 2010-11-02 21:34:25 Re: [PERFORM] typoed column name, but postgres didn't grump