Lists: | pgsql-hackerspgsql-patches |
---|
From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Timestamp docs weirdness |
Date: | 2003-10-22 07:21:23 |
Message-ID: | 3F962FF3.4070900@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
What does this in the date/time type docs mean?
zulu, allballs, z time 00:00:00.00 UTC
Cos it has bizarro behaviour:
In 7.3.4:
australia=# select 'zulu'::time;
ERROR: Bad time external representation 'zulu'
australia=# select 'allballs'::time;
time
----------
00:00:00
(1 row)
australia=# select 'z'::time;
ERROR: Bad time external representation 'z'
australia=# select 'zulu, allballs, z'::time;
ERROR: Bad time external representation 'zulu, allballs, z'
australia=#
Virtually identical behaviour in 7.4b4.
What in the heck is 'zulu', 'allballs' or 'z'???
Chris
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Timestamp docs weirdness |
Date: | 2003-10-22 08:12:11 |
Message-ID: | Pine.LNX.4.44.0310221006220.6259-100000@peter.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Christopher Kings-Lynne writes:
> What in the heck is 'zulu', 'allballs' or 'z'???
'allballs' probably alludes to the visual appearance of '00:00:00'. 'z'
and 'zulu' should be time zones equivalent (or similar?) to UTC or GMT
((US?) military jargon).
--
Peter Eisentraut peter_e(at)gmx(dot)net
From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Timestamp docs weirdness |
Date: | 2003-10-22 08:21:02 |
Message-ID: | 3F963DEE.9080104@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
>>What in the heck is 'zulu', 'allballs' or 'z'???
>
>
> 'allballs' probably alludes to the visual appearance of '00:00:00'. 'z'
> and 'zulu' should be time zones equivalent (or similar?) to UTC or GMT
> ((US?) military jargon).
But they don't work...
Chris
From: | Marcus Brger <mail(at)marcus-boerger(dot)de> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Timestamp docs weirdness |
Date: | 2003-10-22 08:41:27 |
Message-ID: | 157823625906.20031022104127@marcus-boerger.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Hello Christopher,
Wednesday, October 22, 2003, 10:21:02 AM, you wrote:
>>>What in the heck is 'zulu', 'allballs' or 'z'???
>>
>>
>> 'allballs' probably alludes to the visual appearance of '00:00:00'. 'z'
>> and 'zulu' should be time zones equivalent (or similar?) to UTC or GMT
>> ((US?) military jargon).
> But they don't work...
Only the combination of both doesn't work:
template1=# select 'allballs'::timetz;
timetz
-------------
00:00:00+00
(1 row)
template1=# select '0:0:0 z'::timetz;
timetz
-------------
00:00:00+00
(1 row)
template1=# select '0:0:0 zulu'::timetz;
timetz
-------------
00:00:00+00
(1 row)
template1=# select 'allballs'::timetz;
timetz
-------------
00:00:00+00
(1 row)
template1=# select 'allballs z'::timetz;
ERROR: Bad time external representation 'allballs z'
template1=# select 'allballs zulu'::timetz;
ERROR: Bad time external representation 'allballs zulu'
Your problem is using 'time' which doesn't know time zones.
--
Best regards,
Marcus mailto:mail(at)marcus-boerger(dot)de
From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Marcus Börger <mail(at)marcus-boerger(dot)de> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Timestamp docs weirdness |
Date: | 2003-10-22 09:07:32 |
Message-ID: | 3F9648D4.5000704@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Here is a documentation patch that makes it all more consistent.
Chris
Marcus Börger wrote:
> Hello Christopher,
>
> Wednesday, October 22, 2003, 10:21:02 AM, you wrote:
>
>
>>>>What in the heck is 'zulu', 'allballs' or 'z'???
Attachment | Content-Type | Size |
---|---|---|
datatype.txt | text/plain | 1.5 KB |
From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Timestamp docs weirdness |
Date: | 2003-10-22 09:26:50 |
Message-ID: | 3F964D5A.50301@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
> 'allballs' probably alludes to the visual appearance of '00:00:00'. 'z'
> and 'zulu' should be time zones equivalent (or similar?) to UTC or GMT
> ((US?) military jargon).
Why do we support just 'zulu' and none of the other magic time zone names:
http://wwp.greenwichmeantime.com/info/timezone.htm
Chris
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Timestamp docs weirdness |
Date: | 2003-10-22 13:53:34 |
Message-ID: | 11026.1066830814@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> Why do we support just 'zulu' and none of the other magic time zone names:
> http://wwp.greenwichmeantime.com/info/timezone.htm
AFAIK, zulu is the only one of those "military" designations that has
any currency at all. I don't feel a strong need to import the rest
... particularly not the single-letter versions; the presence of those
would allow the system to accept many typos :-(
The real answer to all such questions, though, is that we ought not have
the set of known timezone names locked down in code at all. It should
come from a user-alterable configuration file. This would let us get
rid of "australian_timezones" as well as solve the perennial gripes from
out-of-the-way places that their favorite local zone name isn't
recognized.
regards, tom lane
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Marcus Börger <mail(at)marcus-boerger(dot)de>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Timestamp docs weirdness |
Date: | 2003-10-22 18:10:59 |
Message-ID: | 200310221810.h9MIAxf01784@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Patch applied. Thanks.
---------------------------------------------------------------------------
Christopher Kings-Lynne wrote:
> Here is a documentation patch that makes it all more consistent.
>
> Chris
>
>
> Marcus B?rger wrote:
>
> > Hello Christopher,
> >
> > Wednesday, October 22, 2003, 10:21:02 AM, you wrote:
> >
> >
> >>>>What in the heck is 'zulu', 'allballs' or 'z'???
>
> Index: doc/src/sgml/datatype.sgml
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/doc/src/sgml/datatype.sgml,v
> retrieving revision 1.126
> diff -c -r1.126 datatype.sgml
> *** doc/src/sgml/datatype.sgml 16 Oct 2003 04:52:21 -0000 1.126
> --- doc/src/sgml/datatype.sgml 22 Oct 2003 09:02:10 -0000
> ***************
> *** 1573,1582 ****
> <entry><literal>04:05 PM</literal></entry>
> <entry>same as 16:05; input hour must be <= 12</entry>
> </row>
> - <row>
> - <entry><literal>allballs</literal></entry>
> - <entry>same as 00:00:00</entry>
> - </row>
> <row>
> <entry>04:05:06.789-8</entry>
> <entry>ISO 8601</entry>
> --- 1573,1578 ----
> ***************
> *** 1627,1632 ****
> --- 1623,1636 ----
> <entry>-8</entry>
> <entry>ISO-8601 offset for PST</entry>
> </row>
> + <row>
> + <entry>zulu</entry>
> + <entry>Military abbreviation for GMT</entry>
> + </row>
> + <row>
> + <entry>z</entry>
> + <entry>Short form of zulu</entry>
> + </row>
> </tbody>
> </tgroup>
> </table>
> ***************
> *** 1828,1834 ****
> <entry>midnight yesterday</entry>
> </row>
> <row>
> ! <entry><literal>zulu</>, <literal>allballs</>, <literal>z</></entry>
> <entry><type>time</type></entry>
> <entry>00:00:00.00 UTC</entry>
> </row>
> --- 1832,1838 ----
> <entry>midnight yesterday</entry>
> </row>
> <row>
> ! <entry><literal>allballs</literal></entry>
> <entry><type>time</type></entry>
> <entry>00:00:00.00 UTC</entry>
> </row>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Marcus Brger <mail(at)marcus-boerger(dot)de> |
Cc: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Timestamp docs weirdness |
Date: | 2003-10-26 04:42:29 |
Message-ID: | 200310260442.h9Q4gTB14608@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
OK, do we want to put back the mention of these in the release notes?
The non-zulu ones sound pretty strange to me and might be better left
undocumented.
---------------------------------------------------------------------------
Marcus B?rger wrote:
> Hello Christopher,
>
> Wednesday, October 22, 2003, 10:21:02 AM, you wrote:
>
> >>>What in the heck is 'zulu', 'allballs' or 'z'???
> >>
> >>
> >> 'allballs' probably alludes to the visual appearance of '00:00:00'. 'z'
> >> and 'zulu' should be time zones equivalent (or similar?) to UTC or GMT
> >> ((US?) military jargon).
>
> > But they don't work...
>
> Only the combination of both doesn't work:
> template1=# select 'allballs'::timetz;
> timetz
> -------------
> 00:00:00+00
> (1 row)
>
> template1=# select '0:0:0 z'::timetz;
> timetz
> -------------
> 00:00:00+00
> (1 row)
>
> template1=# select '0:0:0 zulu'::timetz;
> timetz
> -------------
> 00:00:00+00
> (1 row)
>
> template1=# select 'allballs'::timetz;
> timetz
> -------------
> 00:00:00+00
> (1 row)
>
> template1=# select 'allballs z'::timetz;
> ERROR: Bad time external representation 'allballs z'
> template1=# select 'allballs zulu'::timetz;
> ERROR: Bad time external representation 'allballs zulu'
>
> Your problem is using 'time' which doesn't know time zones.
>
> --
> Best regards,
> Marcus mailto:mail(at)marcus-boerger(dot)de
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Marcus Börger <mail(at)marcus-boerger(dot)de>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Timestamp docs weirdness |
Date: | 2003-10-26 08:30:15 |
Message-ID: | 3F9B8617.6080106@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
> OK, do we want to put back the mention of these in the release notes?
> The non-zulu ones sound pretty strange to me and might be better left
> undocumented.
What's there to go in the release notes? We haven't changed any code,
and zulu is the only 'named' timezone we support (from checking source
code).
I've just reorganised the docs, so that it's actually explained what
they are.
Chris
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Marcus Börger <mail(at)marcus-boerger(dot)de>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Timestamp docs weirdness |
Date: | 2003-10-26 14:03:20 |
Message-ID: | 200310261403.h9QE3Ke09651@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Oh, OK, sounds like we are good.
---------------------------------------------------------------------------
Christopher Kings-Lynne wrote:
> > OK, do we want to put back the mention of these in the release notes?
> > The non-zulu ones sound pretty strange to me and might be better left
> > undocumented.
>
> What's there to go in the release notes? We haven't changed any code,
> and zulu is the only 'named' timezone we support (from checking source
> code).
>
> I've just reorganised the docs, so that it's actually explained what
> they are.
>
> Chris
>
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Marcus Brger <mail(at)marcus-boerger(dot)de>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Timestamp docs weirdness |
Date: | 2003-10-27 18:10:45 |
Message-ID: | 815.1067278245@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> OK, do we want to put back the mention of these in the release notes?
> The non-zulu ones sound pretty strange to me and might be better left
> undocumented.
AFAICS the updated docs are correct. Since the code behavior has not
changed, there is no need for a release-notes entry, is there?
>> Only the combination of both doesn't work:
>> template1=# select 'allballs zulu'::timetz;
>> ERROR: Bad time external representation 'allballs zulu'
That's because 'allballs' is defined as '00:00:00 UTC', that is,
it already defines a timezone. The above is a double specification
of timezone and gets the same error as
regression=# select '00:00:00 UTC UTC'::timetz;
ERROR: invalid input syntax for type time with time zone: "00:00:00 UTC UTC"
I see no bug here.
regards, tom lane