pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rericha <d.rericha@healthcareoss.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: date out of range for timestamp
Date: Tue, 28 Dec 2010 21:45:48 -0500
Message-ID: <23542.1293590748@sss.pgh.pa.us> (raw)
In-Reply-To: <4D1A9D8E.70803@healthcareoss.com>
References: <4D1A7AB3.4010008@healthcareoss.com>
	<13702.1293586580@sss.pgh.pa.us>
	<4D1A9D8E.70803@healthcareoss.com>

[ please keep the list cc'd ]

David Rericha <d.rericha@healthcareoss.com> writes:
> I am truly typing the date as a literal.  It turned out that I did have
> a date of year 2010000, which would have been out of range, but I
> changed it.  But I still get the error.

Hmm.  Try re-running ANALYZE on the table.  I'm thinking that maybe
(a) the way-out-of-line date is still in the statistical histogram, and
(b) the planner is using date-to-timestamp coercion while trying to
estimate the selectivity of the <= condition.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <23542.1293590748@sss.pgh.pa.us>
Permalink:  ../23542.1293590748@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23542.1293590748@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, d.rericha@healthcareoss.com
  Subject: Re: date out of range for timestamp
  In-Reply-To: <23542.1293590748@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox