From: Thomas G. Lockhart Date: Sat, 29 Dec 2001 18:35:54 +0000 (+0000) Subject: Document the precision arguments for date/time types per SQL9x. X-Git-Tag: REL7_2_BETA5~136 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dd0279b1baf3b4bc5add9cb10868c5848fe227ba;p=postgresql Document the precision arguments for date/time types per SQL9x. Update the list of recognized time zones. Document the range of arguments allowed for SET TIME ZONE. Still need to add info on other date/time symbols (e.g. "AM", "T") and to freshen the docs on the date/time parsing rules. --- diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 45d14306cc..62117820f7 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1,5 +1,5 @@ @@ -135,7 +135,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.80 2001/12/23 20:21:37 tg - interval + interval(p) general-use time span @@ -165,8 +165,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.80 2001/12/23 20:21:37 tg - numeric(p, s) - decimal(p, s) + numeric [ (p, + s) ] + decimal [ (p, + s) ] exact numeric with selectable precision @@ -1306,7 +1308,7 @@ SELECT b, char_length(b) FROM test2; 1 day - time [ without time zone ] + time [ (p) ] [ without time zone ] times of day only 8 bytes 00:00:00.00 @@ -1314,7 +1316,7 @@ SELECT b, char_length(b) FROM test2; 1 microsecond - time with time zone + time [ (p) ] with time zone times of day only 12 bytes 00:00:00.00+12 @@ -2164,7 +2166,7 @@ January 8 04:05:06 1999 PST PostgreSQL for legacy applications and for compatibility with other RDBMS implementations). PostgreSQL - assumes local time for any type containing only + assumes your local time zone for any type containing only date or time. Further, time zone support is derived from the underlying operating system time-zone capabilities, and hence can handle daylight-saving time diff --git a/doc/src/sgml/datetime.sgml b/doc/src/sgml/datetime.sgml index 5fa04bf254..cc1f121622 100644 --- a/doc/src/sgml/datetime.sgml +++ b/doc/src/sgml/datetime.sgml @@ -1,5 +1,5 @@ @@ -54,17 +54,17 @@ Date/time details AESST - +11:00 + +11:00 Australia Eastern Summer Standard Time ACSST - +10:30 + +10:30 Central Australia Summer Standard Time CADT - +10:30 + +10:30 Central Australia Daylight Savings Time @@ -74,12 +74,12 @@ Date/time details AEST - +10:00 + +10:00 Australia Eastern Standard Time EAST - +10:00 + +10:00 East Australian Standard Time @@ -92,368 +92,423 @@ Date/time details +10:00 Melbourne, Australia - - ACST - +09:30 - Central Australia Standard Time - SAST - +09:30 + +09:30 South Australia Standard Time CAST - +09:30 + +09:30 Central Australia Standard Time AWSST - +9:00 + +09:00 Australia Western Summer Standard Time JST - +9:00 + +09:00 Japan Standard Time,USSR Zone 8 KST - +9:00 + +09:00 Korea Standard Time + + MHT + +09:00 + Kwajalein Time + WDT - +9:00 + +09:00 West Australian Daylight Time MT - +8:30 + +08:30 Moluccas Time AWST - +8:00 + +08:00 Australia Western Standard Time CCT - +8:00 + +08:00 China Coastal Time WADT - +8:00 + +08:00 West Australian Daylight Time WST - +8:00 + +08:00 West Australian Standard Time JT - +7:30 + +07:30 Java Time + + ALMST + +07:00 + Almaty Summer Time + WAST - +7:00 + +07:00 West Australian Standard Time CXT - +7:00 + +07:00 Christmas (Island) Time + + ALMT + +06:00 + Almaty Time + + + MAWT + +06:00 + Mawson (Antarctica) Time + IOT - +5:00 + +05:00 Indian Chagos Time MVT - +5:00 + +05:00 Maldives Island Time TFT - +5:00 + +05:00 Kerguelen Time + + AFT + +04:30 + Afganistan Time + EAST - +4:00 + +04:00 Antananarivo Savings Time MUT - +4:00 + +04:00 Mauritius Island Time RET - +4:00 + +04:00 Reunion Island Time SCT - +4:00 + +04:00 Mahe Island Time IT - +3:30 + +03:30 Iran Time EAT - +3:00 + +03:00 Antananarivo, Comoro Time BT - +3:00 + +03:00 Baghdad Time EETDST - +3:00 + +03:00 Eastern Europe Daylight Savings Time + + HMT + +03:00 + Hellas Mediterranean Time (?) + BDST - +2:00 + +02:00 British Double Standard Time CEST - +2:00 + +02:00 Central European Savings Time CETDST - +2:00 + +02:00 Central European Daylight Savings Time EET - +2:00 + +02:00 Eastern Europe, USSR Zone 1 FWT - +2:00 + +02:00 French Winter Time IST - +2:00 + +02:00 Israel Standard Time MEST - +2:00 + +02:00 Middle Europe Summer Time METDST - +2:00 + +02:00 Middle Europe Daylight Time SST - +2:00 + +02:00 Swedish Summer Time BST - +1:00 + +01:00 British Summer Time CET - +1:00 + +01:00 Central European Time DNT - +1:00 + +01:00 Dansk Normal Tid FST - +1:00 + +01:00 French Summer Time MET - +1:00 + +01:00 Middle Europe Time MEWT - +1:00 + +01:00 Middle Europe Winter Time MEZ - +1:00 + +01:00 Middle Europe Zone NOR - +1:00 + +01:00 Norway Standard Time SET - +1:00 + +01:00 Seychelles Time SWT - +1:00 + +01:00 Swedish Winter Time WETDST - +1:00 + +01:00 Western Europe Daylight Savings Time GMT - 0:00 + +00:00 Greenwich Mean Time WET - 0:00 + +00:00 Western Europe WAT - -1:00 + -01:00 West Africa Time NDT - -2:30 + -02:30 Newfoundland Daylight Time ADT - -03:00 + -03:00 Atlantic Daylight Time + + AWT + -03:00 + (unknown) + NFT - -3:30 + -03:30 Newfoundland Standard Time NST - -3:30 + -03:30 Newfoundland Standard Time AST - -4:00 + -04:00 Atlantic Standard Time (Canada) + + ACST + -04:00 + Atlantic/Porto Acre Summer Time + + + ACT + -05:00 + Atlantic/Porto Acre Standard Time + EDT - -4:00 + -04:00 Eastern Daylight Time CDT - -5:00 + -05:00 Central Daylight Time EST - -5:00 + -05:00 Eastern Standard Time CST - -6:00 + -06:00 Central Standard Time MDT - -6:00 + -06:00 Mountain Daylight Time MST - -7:00 + -07:00 Mountain Standard Time PDT - -7:00 + -07:00 Pacific Daylight Time + + AKDT + -08:00 + Alaska Daylight Time + PST - -8:00 + -08:00 Pacific Standard Time YDT - -8:00 + -08:00 Yukon Daylight Time + + AKST + -09:00 + Alaska Standard Time + HDT - -9:00 + -09:00 Hawaii/Alaska Daylight Time YST - -9:00 + -09:00 Yukon Standard Time AHST - -10:00 + -10:00 Alaska-Hawaii Standard Time + + HST + -10:00 + Hawaii Standard Time + CAT - -10:00 + -10:00 Central Alaska Time @@ -503,6 +558,11 @@ Date/time details + + ACST + +09:30 + Central Australia Standard Time + CST +10:30 @@ -515,7 +575,7 @@ Date/time details SAT - +9:30 + +09:30 South Australian Standard Time @@ -582,7 +642,7 @@ Date/time details as either a special string (e.g. today), day (e.g. Thursday), month (e.g. January), - or noise word (e.g. on). + or noise word (e.g. at, on). Set field values and bit mask for fields. diff --git a/doc/src/sgml/ref/set.sgml b/doc/src/sgml/ref/set.sgml index 871a7a403a..5e72bf3c45 100644 --- a/doc/src/sgml/ref/set.sgml +++ b/doc/src/sgml/ref/set.sgml @@ -1,5 +1,5 @@ @@ -235,6 +235,13 @@ SELECT setseed(value); TIME ZONE TIMEZONE + + Sets the default time zone for your session. Arguments can be + an SQL time interval constant, an integer or double precision + constant, or a string representing a time zone supported by + the host operating system. + + The possible values for time zone depends on your operating system. For example, on Linux @@ -243,10 +250,10 @@ SELECT setseed(value); Here are some valid values for time zone: - - + + - PST8PDT + 'PST8PDT' Set the time zone for California. @@ -254,10 +261,10 @@ SELECT setseed(value); - Portugal + 'Portugal' - Set time zone for Portugal. + Set the time zone for Portugal. @@ -265,7 +272,24 @@ SELECT setseed(value); 'Europe/Rome' - Set time zone for Italy. + Set the time zone for Italy. + + + + + 7 + + + Set the time zone to 7 hours offset west from GMT (equivalent + to PDT). + + + + INTERVAL '08:00' HOUR TO MINUTE + + + Set the time zone to 8 hours offset west from GMT (equivalent + to PST). @@ -286,9 +310,9 @@ SELECT setseed(value); becomes GMT (on most systems anyway). - If the PGTZ environment variable is set in the frontend + If the PGTZ environment variable is set in the frontend environment of a client based on libpq, libpq will automatically - set TIMEZONE to the value of PGTZ during connection start-up. + set TIMEZONE to the value of PGTZ during connection start-up.