Re: [HACKERS] Timezones (in 8.5?)

2009-11-29 Thread Andrew Gierth
Bruce == Bruce Momjian br...@momjian.us writes: Bruce I think there is general agreement that we should have a Bruce timezone data type which validates against Bruce pg_timezone_names().name. What happens when pg_timezone_names output changes? (which it can do, especially if the install is

Re: [HACKERS] Timezones (in 8.5?)

2009-11-29 Thread Bruce Momjian
Andrew Gierth wrote: Bruce == Bruce Momjian br...@momjian.us writes: Bruce I think there is general agreement that we should have a Bruce timezone data type which validates against Bruce pg_timezone_names().name. What happens when pg_timezone_names output changes? (which it can do,

Re: [HACKERS] Timezones (in 8.5?)

2009-11-29 Thread David E. Wheeler
On Nov 28, 2009, at 5:40 PM, Bruce Momjian wrote: I think there is general agreement that we should have a timezone data type which validates against pg_timezone_names().name. It might be enough to just document how users can create such a domain data type, but I don't know of a way to do

Re: [HACKERS] Timezones (in 8.5?)

2009-11-29 Thread Pavel Stehule
2009/11/29 David E. Wheeler da...@kineticode.com: On Nov 28, 2009, at 5:40 PM, Bruce Momjian wrote: I think there is general agreement that we should have a timezone data type which validates against pg_timezone_names().name.  It might be enough to just document how users can create such a

Re: [HACKERS] Timezones (in 8.5?)

2009-11-28 Thread Bruce Momjian
hernan gonzalez wrote: hernan The support of timezones is really crippled ?hernan now. Crippled how? Well, among other things, no builtin date-timetype allows me to save the timezone (or even the offset). No type allows to treat this three datetimes as different values. '2010-07-27

Re: [HACKERS] Timezones (in 8.5?)

2009-11-25 Thread hernan gonzalez
hernan The support of timezones is really crippled  hernan now. Crippled how? Well, among other things, no builtin date-timetype allows me to save the timezone (or even the offset). No type allows to treat this three datetimes as different values. '2010-07-27 10:30 GMT+4' '2010-07-27 09:30

Re: [HACKERS] Timezones (in 8.5?)

2009-11-25 Thread hgonzalez
On Nov 19, 2009 1:18am, Andrew Gierth and...@tao11.riddles.org.uk wrote: Right, but including more data in a single type is the wrong approach, since it complicates the semantics and interferes with normalization. For example, if you have a type T which incorporates a timestamp and a timezone,

Re: [HACKERS] Timezones (in 8.5?)

2009-11-19 Thread Robert Haas
On Wed, Nov 18, 2009 at 11:18 PM, Andrew Gierth and...@tao11.riddles.org.uk wrote: Kevin == Kevin Grittner kevin.gritt...@wicourts.gov writes:   If he meant (A), then you store the event as:   (ts,tz) = (timestamp '2010-07-27 10:30:00',   'Chile/Santiago')   If he meant (B), then you store

Re: [HACKERS] Timezones (in 8.5?)

2009-11-19 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: On Wed, Nov 18, 2009 at 11:18 PM, Andrew Gierth and...@tao11.riddles.org.uk wrote: Kevin == Kevin Grittner kevin.gritt...@wicourts.gov writes: If he meant (A), then you store the event as: (ts,tz) = (timestamp '2010-07-27 10:30:00',

Re: [HACKERS] Timezones (in 8.5?)

2009-11-19 Thread Andrew Gierth
Kevin == Kevin Grittner kevin.gritt...@wicourts.gov writes: For example, if you have a type T which incorporates a timestamp and a timezone, what semantics does the T = T operator have? What semantics apply if the definitions of timezones change? Kevin I'd rather sort that out once and

Re: [HACKERS] Timezones (in 8.5?)

2009-11-18 Thread Kevin Grittner
Andrew Gierth and...@tao11.riddles.org.uk wrote: If he meant (A), then you store the event as: (ts,tz) = (timestamp '2010-07-27 10:30:00', 'Chile/Santiago') If he meant (B), then you store the event as (tsz,tz) = (timestamp '2010-07-27 10:30:00' at time zone

Re: [HACKERS] Timezones (in 8.5?)

2009-11-18 Thread Andrew Gierth
Kevin == Kevin Grittner kevin.gritt...@wicourts.gov writes: If he meant (A), then you store the event as: (ts,tz) = (timestamp '2010-07-27 10:30:00', 'Chile/Santiago') If he meant (B), then you store the event as (tsz,tz) = (timestamp '2010-07-27 10:30:00' at time zone

[HACKERS] Timezones (in 8.5?)

2009-11-17 Thread hernan gonzalez
Are there any plans to (is anybody working on) implement better timezone support in postgresql for 8.5 ? Specifically, store the timezone info -instead of just the timestamp as UTC ? http://wiki.postgresql.org/wiki/Todo#Dates_and_Times Hernán J. González -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Timezones (in 8.5?)

2009-11-17 Thread Robert Haas
On Tue, Nov 17, 2009 at 10:21 AM, hernan gonzalez hgonza...@gmail.com wrote: Are there any plans to (is anybody working on) implement better timezone support in postgresql for 8.5 ? Specifically, store the timezone info -instead of just the timestamp as UTC ?

Re: [HACKERS] Timezones (in 8.5?)

2009-11-17 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: One random thought - I am not aware that we currently have a time zone type in which to store a time zone in. Is there any value in having such a thing vs. just using varchar? The main potential advantage seems to be faster lookup of the zone's

Re: [HACKERS] Timezones (in 8.5?)

2009-11-17 Thread hernan gonzalez
Perhaps the OP should explain exactly what real-world problems he's trying to solve.  As noted in the discussion you linked, there's not a lot of enthusiasm around here for getting closer to the spec's datetime handling simply because it's the spec; that part of the spec is just too broken

Re: [HACKERS] Timezones (in 8.5?)

2009-11-17 Thread Kevin Grittner
hernan gonzalez hgonza...@gmail.com wrote: I believe that this distinction between two realms: one related to (say) physical time and the other to (say) civil date-time, is the key to put some order... conceptually, at least (I'm not speaking about feasibility for now). This is the approach

Re: [HACKERS] Timezones (in 8.5?)

2009-11-17 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: hernan gonzalez hgonza...@gmail.com wrote: I believe that this distinction between two realms: one related to (say) physical time and the other to (say) civil date-time, is the key to put some order... conceptually, at least (I'm not speaking

Re: [HACKERS] Timezones (in 8.5?)

2009-11-17 Thread Andrew Gierth
hernan == hernan gonzalez hgonza...@gmail.com writes: Perhaps the OP should explain exactly what real-world problems he's trying to solve.  As noted in the discussion you linked, there's not a lot of enthusiasm around here for getting closer to the spec's datetime handling simply because