Re: invalid abstime to timestamp error only on specific date range

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: zhong ming wu <mr(dot)z(dot)m(dot)wu(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: invalid abstime to timestamp error only on specific date range
Date: 2010-04-27 15:02:16
Message-ID: 14343.1272380536@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

zhong ming wu <mr(dot)z(dot)m(dot)wu(at)gmail(dot)com> writes:
> I have a postgres table with a column type abstime. (all data in this
> database are loaded from an ancient propriety database)

> When I filter data from this table with a specific date range on this
> column it works. When I filter with a different date range
> it gives me an error like

> invalid abstime to timestamp

> I don't have that server at this moment and I cannot post exact error.

The closest thing I can find to that in the code is

cannot convert abstime "invalid" to timestamp

The abstime type does have a special reserved value "invalid", while
timestamp doesn't so that value can't be converted to timestamp.

I'm guessing that you have an "invalid" or two lurking in the table
somewhere, but it's hard to be specific with so few details. You've not
shown us enough information to tell why your query would be trying to
convert any abstime values to timestamp --- let alone that particular
one.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2010-04-27 16:14:37 Re: PostgreSQL Performance issue
Previous Message Bayless Kirtley 2010-04-27 14:31:56 Re: PostgreSQL Performance issue