Re: index over timestamp not being used

От: Tom Lane
Тема: Re: index over timestamp not being used
Дата: ,
Msg-id: 15140.1185306195@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: index over timestamp not being used  (Arnau)
Ответы: Re: index over timestamp not being used  (Mario Weilguni)
Список: pgsql-performance

Скрыть дерево обсуждения

index over timestamp not being used  (Arnau, )
 Re: index over timestamp not being used  (Tom Lane, )
  Re: index over timestamp not being used  (Arnau, )
   Re: index over timestamp not being used  (Tom Lane, )
    Re: index over timestamp not being used  (Mario Weilguni, )
     Re: index over timestamp not being used  (Ansgar -59cobalt- Wiechers, )

Arnau <> writes:
>> Alternatively, do you really need to_timestamp at all?  The standard
>> timestamp input routine won't have any problem with that format:
>> t.timestamp_in >= '20070101'

> This is always I think I'm worried, what happens if one day the internal
> format in which the DB stores the date/timestamps changes. I mean, if
> instead of being stored as YYYYMMDD is stored as DDMMYYYY, should we
> have to change all the queries?

You are confusing internal storage format with the external
representation.

> I thought the
> to_char/to_date/to_timestamp functions were intented for this purposes

No, they're intended for dealing with wacky formats that the regular
input/output routines can't understand or produce.

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: Karl Denninger
Дата:
Сообщение: Performance issue with 8.2.3 - "C" application
От: Tom Lane
Дата:
Сообщение: Re: Performance issue with 8.2.3 - "C" application