Dirk Heinrichs 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
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 limi
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
Dimitri Fontaine writes:
> Dirk Heinrichs writes:
>> Please find the patch attached. It's against 8.4.5.
>>
>> extern Datum moddatetime(PG_FUNCTION_ARGS);
>> +extern Datum moddatetimetz(PG_FUNCTION_ARGS);
> [...]
>> +CREATE OR REPLACE FUNCTION moddatetimetz()
>> +RETURNS trigger
>> +AS 'MODULE_P
Am 02.11.2010 23:09, schrieb Dimitri Fontaine:
> So I guess that you need to modify very little code to get the trigger
> to work for both types.
Please find the patch attached. It's against 8.4.5.
Bye...
Dirk
diff -u spi.old/moddatetime.c spi/moddatetime.c
--- spi.old/moddatetime.c 201
Dirk Heinrichs writes:
> Please find the patch attached. It's against 8.4.5.
>
> extern Datum moddatetime(PG_FUNCTION_ARGS);
> +extern Datum moddatetimetz(PG_FUNCTION_ARGS);
[...]
> +CREATE OR REPLACE FUNCTION moddatetimetz()
> +RETURNS trigger
> +AS 'MODULE_PATHNAME'
> +LANGUAGE C;
You can also
"Dirk Heinrichs" 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
The following bug has been logged online:
Bug reference: 5740
Logged by: Dirk Heinrichs
Email address: dirk.heinri...@altum.de
PostgreSQL version: 8.4.5
Operating system: Linux
Description:contrib/spi/moddatetime.c doesn't work with timezones.
Details:
The moddateti