Re: Can LC_TIME affect timestamp input?

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: Can LC_TIME affect timestamp input?
Дата
Msg-id kekjo4$mjn$1@gonzo.reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на Can LC_TIME affect timestamp input?  (Paul Jones <pbj@cmicdo.com>)
Список pgsql-general
On 2013-01-28, Paul Jones <pbj@cmicdo.com> wrote:

>
> Since posting this, I tried digging around in the source code.  From looking at
> "timestamp_in" and related routines, it doesn't appear to take into account
> any LC_* environment var.  And I didn't see strftime(3) used for timestamps
> (although I could have missed it.)  Timestamp input seems hard-wired for the
> most part.

Strftime doesn't understand fractions of seconds, which makes it
unsuitable for postgres, also certian modern platforms have only
a primitive strftime, which is likely to cause headaches for developers.

Perhaps you could create a new type based on timestamp and write an input
function that fixes the DB2 output, you'd then be stuck with your new
type instead of the esisting one but it shouldn't be hard to make it
compatible.  (unless you want to attack the system tables to change it
in a non-standard way)


--
⚂⚃ 100% natural

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

Предыдущее
От: Jasen Betts
Дата:
Сообщение: Re: finding if a period is multiples of a given interval
Следующее
От: Jasen Betts
Дата:
Сообщение: Re: Optimizing query?