![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
I'm inclined to think that rejecting impossible or ambiguous input without a zone is reasonable (and it would go along with the changes we made in 7.4 to tighten up datetime field order assumptions). But I don't want to take away the convenience of leaving off the zone altogether. 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. |
#12
| |||
| |||
|
|
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. |
|
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. |
#13
| |||
| |||
|
|
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. |
#14
| |||
| |||
|
|
Randall Nortman <postgreslists (AT) wonderclown (DOT) com> writes: Ah, I see now. PostgreSQL is behaving a bit differently than I expected. The timestamp string above is ambiguous in the timezone US/Eastern -- it could be EST or EDT. I was expecting PostgreSQL to resolve this ambiguity based on the current time when the SQL statement is processed I think this would be a very bad thing for it to do. It might seem to make sense for a timestamp representing "now", but as soon as you consider a timestamp that isn't "now" it becomes a sure way to shoot yourself in the foot. |
![]() |
| Thread Tools | |
| Display Modes | |
| |