X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 66BA04764C3 for ; Wed, 7 May 2003 11:52:33 -0400 (EDT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 55136476479 for ; Wed, 7 May 2003 11:52:32 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 1AC3BD613; Wed, 7 May 2003 08:52:37 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 1072C5C0A; Wed, 7 May 2003 08:52:37 -0700 (PDT) Date: Wed, 7 May 2003 08:52:36 -0700 (PDT) From: Stephan Szabo To: Thomas Good Cc: Tom Lane , Ian Barwick , Postgres SQL List Subject: Re: Date Anomaly?? In-Reply-To: Message-ID: <20030507085145.L26747-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-26.0 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/131 X-Sequence-Number: 13296 On Wed, 7 May 2003, Thomas Good wrote: > On Wed, 7 May 2003, Tom Lane wrote: > > > Thomas Good writes: > > > Another item: if I say 'export PGDATESTYLE=US' and ask psql for > > > the date I get back an ISO date (YYYY-MM-DD). What region of this > > > US is this, I wonder? Must be San Francisco (maybe Josh knows ;-) > > > > That's only setting a substyle --- one that's not relevant to the ISO > > major style (at least not on output). See the SET reference page. > > Tom, > > So the closest approximation to the default "postgres[ql]" date style > of MM-DD-YYYY (note delimiters) is: SQL,US which returns a > MM/DD/YYYY 00:00:00 value when doing some date arithmetic? I think you're getting a timestamp after doing that date arithmetic. Does casting it back to a date help any?