1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Make EXTRACT(TIMEZONE) and SET/SHOW TIMEZONE follow the SQL convention

for the sign of timezone offsets, ie, positive is east from UTC.  These
were previously out of step with other operations that accept or show
timezones, such as I/O of timestamptz values.
This commit is contained in:
Tom Lane
2003-07-17 00:55:37 +00:00
parent 93236b58e0
commit 764f72dc82
10 changed files with 74 additions and 41 deletions

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.159 2003/07/15 19:19:55 tgl Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.160 2003/07/17 00:55:36 tgl Exp $
PostgreSQL documentation
-->
@ -5016,16 +5016,16 @@ SELECT EXTRACT(SECOND FROM TIME '17:12:28.5');
</screen>
</listitem>
</varlistentry>
<!--
<varlistentry>
<term><literal>timezone</literal></term>
<listitem>
<para>
The time zone offset. XXX But in what units?
The time zone offset from UTC, measured in seconds. Positive values
correspond to time zones east of UTC, negative values to
zones west of UTC.
</para>
</listitem>
</varlistentry>
-->
<varlistentry>
<term><literal>timezone_hour</literal></term>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.78 2003/07/15 19:19:56 tgl Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.79 2003/07/17 00:55:36 tgl Exp $
PostgreSQL documentation
-->
@ -182,16 +182,16 @@ SELECT setseed(<replaceable>value</replaceable>);
</listitem>
</varlistentry>
<varlistentry>
<term><literal>7</literal></term>
<term><literal>-7</literal></term>
<listitem>
<para>
The time zone 7 hours west from UTC (equivalent
to PDT). Negative values are east from UTC.
to PDT). Positive values are east from UTC.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>INTERVAL '08:00' HOUR TO MINUTE</literal></term>
<term><literal>INTERVAL '-08:00' HOUR TO MINUTE</literal></term>
<listitem>
<para>
The time zone 8 hours west from UTC (equivalent
@ -205,7 +205,7 @@ SELECT setseed(<replaceable>value</replaceable>);
<listitem>
<para>
Set the time zone to your local time zone (the one that
your operating system defaults to).
the server's operating system defaults to).
</para>
</listitem>
</varlistentry>

View File

@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.197 2003/07/15 19:19:55 tgl Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.198 2003/07/17 00:55:36 tgl Exp $
-->
<appendix id="release">
@ -24,6 +24,8 @@ CDATA means the content is "SGML-free", so you can write without
worries about funny characters.
-->
<literallayout><![CDATA[
EXTRACT(TIMEZONE) and SET/SHOW TIMEZONE now follow SQL sign convention
(positive = east of UTC)
Output of SHOW DATESTYLE is now in the same format accepted by SET DATESTYLE
PL/Python is now an untrusted language, and is renamed to 'plpythonu'
Dollar sign ($) is no longer allowed in operator names