1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00

Apply (a somewhat revised version of) Greg Mullane's patch to eliminate

heuristic determination of day vs month in date/time input.  Add the
ability to specify that input is interpreted as yy-mm-dd order (which
formerly worked, but only for yy greater than 31).  DateStyle's input
component now has the preferred spellings DMY, MDY, or YMD; the older
keywords European and US are now aliases for the first two of these.
Per recent discussions on pgsql-general.
This commit is contained in:
Tom Lane
2003-07-29 00:03:19 +00:00
parent 2baf4efe09
commit 9c2a7c2269
26 changed files with 441 additions and 350 deletions

View File

@@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postgres-ref.sgml,v 1.33 2003/05/02 20:54:33 tgl Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postgres-ref.sgml,v 1.34 2003/07/29 00:03:17 tgl Exp $
PostgreSQL documentation
-->
@@ -147,11 +147,10 @@ PostgreSQL documentation
<term><option>-e</option></term>
<listitem>
<para>
Sets the default date style to <quote>European</quote>, which
means that the <quote>day before month</quote> (rather than
month before day) rule is used to interpret ambiguous date
input, and that the day is printed before the month in certain
date output formats. See <xref linkend="datatype-datetime"> for more information.
Sets the default date style to <quote>European</quote>, that is
<literal>DMY</> ordering of input date fields. This also causes
the day to be printed before the month in certain date output formats.
See <xref linkend="datatype-datetime"> for more information.
</para>
</listitem>
</varlistentry>

View File

@@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.79 2003/07/17 00:55:36 tgl Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.80 2003/07/29 00:03:17 tgl Exp $
PostgreSQL documentation
-->
@@ -283,9 +283,10 @@ SET search_path TO my_schema, public;
<para>
Set the style of date to traditional
<productname>POSTGRES</productname> with European conventions:
<productname>POSTGRES</productname> with <quote>day before month</>
input convention:
<screen>
SET datestyle TO postgres,european;
SET datestyle TO postgres, dmy;
</screen>
</para>

View File

@@ -1,5 +1,5 @@
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/show.sgml,v 1.29 2003/07/15 19:19:56 tgl Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/show.sgml,v 1.30 2003/07/29 00:03:17 tgl Exp $
PostgreSQL documentation
-->
@@ -158,7 +158,7 @@ SHOW ALL
SHOW DateStyle;
DateStyle
-----------
ISO, US
ISO, MDY
(1 row)
</programlisting>
</para>