Re: date comparisons

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Chad Wagner <chad(dot)wagner(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Belinda M(dot) Giardine" <giardine(at)bio(dot)cse(dot)psu(dot)edu>, Erik Jones <erik(at)myemma(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: date comparisons
Date: 2007-02-04 00:03:44
Message-ID: 200702040003.l1403iV26746@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches


OK, so we have a bug. Thanks.

---------------------------------------------------------------------------

Chad Wagner wrote:
> On 2/3/07, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> >
> >
> > Would someone please confirm that our behavior in the three queries
> > below matches Oracle's behavior?
>
>
> Here is output from Oracle:
>
> Connected to:
> Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
> With the Partitioning, OLAP and Data Mining options
>
> SQL> alter session set nls_timestamp_format = 'YYYY-MM-DD HH.MI.SSXFF AM';
>
> Session altered.
>
> SQL> select to_timestamp('January 2006', 'Month YYYY') from dual;
>
> TO_TIMESTAMP('JANUARY2006','MONTHYYYY')
> ---------------------------------------------------------------------------
> 2006-01-01 12.00.00.000000000 AM
>
> SQL> select to_timestamp('January 2006', 'Month YYYY') from dual;
>
> TO_TIMESTAMP('JANUARY2006','MONTHYYYY')
> ---------------------------------------------------------------------------
> 2006-01-01 12.00.00.000000000 AM
>
> SQL> select to_timestamp('January 2006', 'FMMonth YYYY') from dual;
>
> TO_TIMESTAMP('JANUARY2006','FMMONTHYYYY')
> ---------------------------------------------------------------------------
> 2006-01-01 12.00.00.000000000 AM

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2007-02-04 03:56:34 Re: Windows default editor for psql \e
Previous Message Chad Wagner 2007-02-04 00:01:40 Re: date comparisons

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2007-02-04 00:04:03 Re: Index split WAL reduction
Previous Message Chad Wagner 2007-02-04 00:01:40 Re: date comparisons