mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +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:
@@ -1,4 +1,4 @@
|
||||
$Header: /cvsroot/pgsql/src/backend/utils/misc/README,v 1.1 2002/05/17 01:19:18 tgl Exp $
|
||||
$Header: /cvsroot/pgsql/src/backend/utils/misc/README,v 1.2 2003/07/29 00:03:18 tgl Exp $
|
||||
|
||||
|
||||
GUC IMPLEMENTATION NOTES
|
||||
@@ -49,8 +49,8 @@ variables, but the return value is handled differently:
|
||||
malloc'd (not palloc'd!!!) string --- assign that value instead
|
||||
The third choice is allowed in case the assign_hook wants to return a
|
||||
"canonical" version of the new value. For example, the assign_hook for
|
||||
datestyle always returns a string that includes both basic datestyle and
|
||||
us/euro option, although the input might have specified only one.
|
||||
datestyle always returns a string that includes both output and input
|
||||
datestyle options, although the input might have specified only one.
|
||||
|
||||
If a show_hook is provided, it points to a function of the signature
|
||||
const char *show_hook(void)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.143 2003/07/28 19:31:32 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.144 2003/07/29 00:03:18 tgl Exp $
|
||||
*
|
||||
*--------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1338,13 +1338,13 @@ static struct config_string ConfigureNamesString[] =
|
||||
|
||||
{
|
||||
{"DateStyle", PGC_USERSET, CLIENT_CONN_LOCALE,
|
||||
gettext_noop("The display format for date and time values"),
|
||||
gettext_noop("As well as the rules for interpreting ambiguous date "
|
||||
"input values"),
|
||||
gettext_noop("The display format for date and time values, "),
|
||||
gettext_noop("as well as the rules for interpreting ambiguous "
|
||||
"date input values"),
|
||||
GUC_LIST_INPUT | GUC_REPORT
|
||||
},
|
||||
&datestyle_string,
|
||||
"ISO, US", assign_datestyle, NULL
|
||||
"ISO, MDY", assign_datestyle, NULL
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
|
||||
# - Locale and Formatting -
|
||||
|
||||
#datestyle = 'iso, us'
|
||||
#datestyle = 'iso, mdy'
|
||||
#timezone = unknown # actually, defaults to TZ environment setting
|
||||
#australian_timezones = false
|
||||
#extra_float_digits = 0 # min -15, max 2
|
||||
|
||||
Reference in New Issue
Block a user