Re: Daylight Savings Time handling on persistent connections

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Vinko Vrsalovic <el(at)vinko(dot)cl>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Randall Nortman <postgreslists(at)wonderclown(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Daylight Savings Time handling on persistent connections
Date: 2004-11-01 18:08:39
Message-ID: 20041101180835.GM26912@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vinko Vrsalovic 2004-11-01 18:42:29 Re: Daylight Savings Time handling on persistent connections
Previous Message John Fabiani 2004-11-01 17:59:44 Calling on all SQL guru's