Re: Daylight Savings Time handling on persistent connections

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Daylight Savings Time handling on persistent connections
Дата
Msg-id 20041101180835.GM26912@svana.org
обсуждение исходный текст
Ответ на Re: Daylight Savings Time handling on persistent connections  (Vinko Vrsalovic <el@vinko.cl>)
Ответы Re: Daylight Savings Time handling on persistent connections  (Vinko Vrsalovic <el@vinko.cl>)
Список pgsql-general
On Mon, Nov 01, 2004 at 01:57:38PM -0300, Vinko Vrsalovic wrote:
> On Sun, Oct 31, 2004 at 05:55:23PM -0500, Tom Lane wrote:
> > One point here is that timestamp-to-timestamptz datatype conversion will
> > be affected by whatever we choose.  While it's easy to say "reject it"
> > for data coming into a database, it's less easy to say that a coercion
> > function should fail on some inputs it didn't use to fail on.
>
> What about letting the user decide on the behaviour through a config
> option? I really missed this when the integer parsing changed.
>
> The default could be to reject ambiguous input, allowing the user to
> choose the assumed zone if he wants to, in a global and per-connection
> basis.

It's not that simple. In this case the conversion will now produce a
different datatype, which means that perfectly valid pl/pgsql may now
be invalid. Columns defined unique will now have a different criteria
for uniqueness. Even how timestamps are stored will be different. By
switching a config option, you may have just invalidated your entire
database.

For the parsing integer issue it may have worked, but this is another
kettle of fish. I don't think you can do this as a simple switch, it
would have to set during the initdb and not allowed to be changed
afterwards. I don't know if that something that can be supported.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

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

Предыдущее
От: John Fabiani
Дата:
Сообщение: Calling on all SQL guru's
Следующее
От: Vinko Vrsalovic
Дата:
Сообщение: Re: Daylight Savings Time handling on persistent connections