Re: DATE type output does not follow datestyle parameter

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: DATE type output does not follow datestyle parameter
Дата
Msg-id 20131202165243.GD5274@momjian.us
обсуждение исходный текст
Ответ на Re: DATE type output does not follow datestyle parameter  ("MauMau" <maumau307@gmail.com>)
Ответы Re: DATE type output does not follow datestyle parameter
Список pgsql-hackers
On Mon, Dec  2, 2013 at 10:22:47PM +0900, MauMau wrote:
> I'm sorry I didn't respond for a long time.  I've come up with a suggestion.
> 
> The original reporter of this problem expected the output of the
> date type in 'Postgres,DMY' style to be "17 Dec 1997", when the
> output of the timestamp if "Wed 17 Dec 07:37:16 1997 PST".  He
> thought so by reading the following sentence:
> 
> http://www.postgresql.org/docs/current/static/datatype-datetime.html
> The output of the date and time types is of course only the date or
> time part in accordance with the given examples.
> 
> However, the actual output of the date type in Postgres style is:
> 
> * 12-17-1997 if datestyle is 'Postgres,YMD' or 'Postgres,MDY'
> * 17-12-1997 if datestyle is 'Postgres,DMY'
> 
> So, my suggestion is to just add the following sentence right after
> the above one.
> 
> The Postgres style is an exception: the output of the date type is
> either MM-DD-YYYY (e.g. 12-17-1997) or DD-MM-YYYY (e.g. 17-12-1997),
> which is different from the date part of the output of the timestamp
> type.
> 
> Could you consider and add this to the manual?

Yes, I will make the change unless someone objects.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + Everyone has their own god. +



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] pg_upgrade ?deficiency
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Proposed feature: Selective Foreign Keys