Skip site navigation (1) Skip section navigation (2)

Re: changing datestyle

From: Karl Nack <karlnack(at)futurityinc(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: changing datestyle
Date: 2009-06-16 17:48:52
Message-ID: alpine.DEB.1.10.0906161242210.20782@mindinao (view raw or flat)
Thread:
Lists: pgsql-novice
>>> (The fact that there are two components is a historical aberration,
>>> and I'd be the first to agree it's ugly, but that's how it works.)
>
> The second one affects field order for some of the output styles, too.
> See
> http://www.postgresql.org/docs/8.3/static/datatype-datetime.html#DATATYPE-DATETIME-OUTPUT
> In particular, tables 8-14 and 8-15 illustrate all the output formatting
> options you have.  SQL, MDY might be the closest to what you want.

Yeah, I was re-reading that section as I got your response, and I've come 
to the same conclusion. I was misunderstanding how the two components work 
together. _Now_ I see why it's ugly!

I knew I was being a knucklehead; thanks for the insight.

Is there any reason I shouldn't simply set my server default to 'SQL, MDY' 
instead of specifying it at connection time (or per database/user)?


Karl Nack

Futurity, Inc.
773-506-2007



In response to

Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2009-06-16 18:00:12
Subject: Re: changing datestyle
Previous:From: Tom LaneDate: 2009-06-16 17:36:01
Subject: Re: changing datestyle

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group