Re: select query on Dates stored as varchar

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: select query on Dates stored as varchar
Дата
Msg-id AANLkTikEbLBG=fnSMk_-37n7_pBNgp8e2ZJr=J06Vt0u@mail.gmail.com
обсуждение исходный текст
Ответ на Re: select query on Dates stored as varchar  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-general
2010/8/30 Scott Marlowe <scott.marlowe@gmail.com>:
> On Mon, Aug 30, 2010 at 2:53 PM, Yosef Haas <yosef@karatedepot.com> wrote:
>> I know it would be best to change the data type of the column (I didn't
>> initially create the table), but doing so would be require changes to
>> several application that use it and I'd like to avoid that if possible.
>
> 1. Most of those changes would involve chain saw type work on those
> apps, i.e. cutting out huge chunks of logic in the app to deal with
> the insanity of a text type storing a timestamp or date in 18
> different ways.
> 2. Any new app written now gets inherit the insanity of having to deal
> with the 18 crazy ways a date / timestamp can get entered into the
> system.
> 3. In the future, after converting, math is simple:
>  where timestampfield between now()-interval '2 days' and now()
> and so on.
> Trust me, in the long run, you'll be thankful to have the right data
> type in there, and your applications will tend to do the right thing.
>

sure +1

Pavel

> --
> To understand recursion, one must first understand recursion.
>

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: select query on Dates stored as varchar
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: select query on Dates stored as varchar