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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.
Дата
Msg-id 20091.1288842928@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Ответы Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.
Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.
Список pgsql-bugs
Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> Dirk Heinrichs <dirk.heinrichs@altum.de> 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 do AS 'MODULE_PATHNAME', 'c_function_name' and maintain a
> single C function that copes with both timestamp and timestamptz
> arguments, that's what I had in mind: you still declare two functions at
> the SQL level, though.

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.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5743: Regexp engine fails to case-insensitively match multi-byte codepoints
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.