Re: DateStyle bug

From: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
To: Manuel Sugawara <masm(at)fciencias(dot)unam(dot)mx>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: DateStyle bug
Date: 2002-02-21 20:25:44
Message-ID: 3C7557C8.348A4092@fourpalms.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> While porting an aplication from 7.0 to 7.2 I found a bug with the use
> of DateStyle variable:

No bug that I can see. Please be more specific, or the explanation might
be that you have some (understandable) confusion over output date styles
(e.g. 'Postgres', 'ISO') and style hints for both input and output (e.g.
'European', 'US').

Simply setting 'European' will only affect the order of priorities for
interpreting months and days for input parameters when the style is set
to 'ISO' (which specifies the order of fields for dates and times, so is
fixed for output). When the output style is set to 'Postgres' then
'European' also affects the order of output of months and days.

- Thomas

> masm(at)dep4$ psql test
> test=# set DateStyle to 'European' ;
> SET VARIABLE
> test=# select now()::date;
> now
> ------------
> 2002-02-21
> (1 row)
>
> test=# \c test
> You are now connected to database test
> test=# set DateStyle to 'Postgres' ;
> SET VARIABLE
> test=# set DateStyle to 'European' ;
> SET VARIABLE
> test=# select now()::date;
> now
> ------------
> 21-02-2002
> (1 row)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message soetebeer.com 2002-02-21 20:29:42 Problems with the lower() and upper() functions and umlaut chars in 7.2
Previous Message Jean-Michel POURE 2002-02-21 20:23:39 Re: [HACKERS] fmgr_info: function 20071: cache lookup failed