Re: [GENERAL] Comment on timezone and interval types

2004-11-05 Thread Tom Lane
Stuart Bishop <[EMAIL PROTECTED]> writes: > | If you want 24 hours you can use 24 hours. Days are not constant length, > | just like months aren't constant length. > Days *are* of constant length - check your nearest dictionary, which > will define it as 24 hours or the period of rotation of the e

Re: [GENERAL] Comment on timezone and interval types

2004-11-05 Thread Michael Glaesemann
On Nov 5, 2004, at 5:38 PM, Stuart Bishop wrote: Bruno Wolff III wrote: | On Fri, Oct 29, 2004 at 11:14:31 -0600, | Guy Fraser <[EMAIL PROTECTED]> wrote: | |>1 day should always be calculated as 24 hours, just as an hour |>is calculated as 60 minutes... | | | If you want 24 hours you can use 24 h

Re: [GENERAL] Comment on timezone and interval types

2004-11-05 Thread Stuart Bishop
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bruno Wolff III wrote: | On Fri, Oct 29, 2004 at 11:14:31 -0600, | Guy Fraser <[EMAIL PROTECTED]> wrote: | |>1 day should always be calculated as 24 hours, just as an hour |>is calculated as 60 minutes... | | | If you want 24 hours you can use 24 hour

Re: [GENERAL] Comment on timezone and interval types

2004-10-29 Thread Bruno Wolff III
On Fri, Oct 29, 2004 at 11:14:31 -0600, Guy Fraser <[EMAIL PROTECTED]> wrote: > > 1 day should always be calculated as 24 hours, just as an hour > is calculated as 60 minutes... If you want 24 hours you can use 24 hours. Days are not constant length, just like months aren't constant length. >

Re: [GENERAL] Comment on timezone and interval types

2004-10-29 Thread Guy Fraser
Yes For example : MST = GMT - 7 hours MDT = GMT - 6 hours The GMT time remains constant no mater if it is or is not daylight savings time. You still want to bill someone for 1 hour of usage from 02:00 MDT to 02:00 MST, but you don't want to bill an hour from 02:00 MST to 03:00 MDT. Unless you are u

Re: [GENERAL] Comment on timezone and interval types

2004-10-29 Thread Tom Lane
Stuart Bishop <[EMAIL PROTECTED]> writes: > If you add a 'day' to a timestamp, it should be identical to adding 24 > hours. No, it should not --- at least not when the addition traverses a DST switchover time. > For example, what is '2am April 3rd 2004 US/Eastern + 1 day'? 2am on > April 4th 2004

Re: [GENERAL] Comment on timezone and interval types

2004-10-29 Thread Stuart Bishop
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bruno Wolff III wrote: | Recently there has been some discussion about attaching a timezone to | a timestamp and some other discussion about including a 'day' part | in the interval type. These two features impact each other, since | if you add a 'day'

Re: [GENERAL] Comment on timezone and interval types

2004-10-27 Thread Tom Lane
Michael Glaesemann <[EMAIL PROTECTED]> writes: > On Oct 27, 2004, at 6:00 PM, Martijn van Oosterhout wrote: >> How can there be a "canonical list of known timezones" if every >> operating system has it's own list. Maybe you can provide a base list, >> but you have to allow for people to make their

Re: [GENERAL] Comment on timezone and interval types

2004-10-27 Thread Marco Ferretti
On Wed, 2004-10-27 at 09:00 +0200, Thomas Hallgren wrote: > Using OID's is a good idea, but I think a canonical list of known > timezone to OID mappings must be maintained and shipped with the > PostgreSQL core. > > If OID's are generated at initdb time, there's a great risk that the > OID's w

Re: [GENERAL] Comment on timezone and interval types

2004-10-27 Thread Michael Glaesemann
On Oct 27, 2004, at 6:00 PM, Martijn van Oosterhout wrote: On Wed, Oct 27, 2004 at 09:21:39AM +0200, Thomas Hallgren wrote: Using OID's is a good idea, but I think a canonical list of known timezone to OID mappings must be maintained and shipped with the PostgreSQL core. How can there be a "canonic

Re: [GENERAL] Comment on timezone and interval types

2004-10-27 Thread Martijn van Oosterhout
On Wed, Oct 27, 2004 at 09:21:39AM +0200, Thomas Hallgren wrote: > Martijn, > >I agree. One issue I can think of is that if you store each timestamp > >as a (seconds,timezone) pair, the storage requirements will balloon, > >since timezone can be something like "Australia/Sydney" and this will > >b

Re: [GENERAL] Comment on timezone and interval types

2004-10-27 Thread Thomas Hallgren
Martijn, I agree. One issue I can think of is that if you store each timestamp as a (seconds,timezone) pair, the storage requirements will balloon, since timezone can be something like "Australia/Sydney" and this will be repeated for every value in the table. I don't know how to deal easily with th

Re: [GENERAL] Comment on timezone and interval types

2004-10-24 Thread Martijn van Oosterhout
On Sat, Oct 23, 2004 at 06:49:15PM -0500, Bruno Wolff III wrote: > Recently there has been some discussion about attaching a timezone to > a timestamp and some other discussion about including a 'day' part > in the interval type. These two features impact each other, since > if you add a 'day' to a

[GENERAL] Comment on timezone and interval types

2004-10-23 Thread Bruno Wolff III
Recently there has been some discussion about attaching a timezone to a timestamp and some other discussion about including a 'day' part in the interval type. These two features impact each other, since if you add a 'day' to a timestamp the result can depend on what timezone the timestamp is suppos