Re: timestamp handling in postgres 7.1 behaves strange

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: martin(dot)wuertele(at)factline(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: timestamp handling in postgres 7.1 behaves strange
Date: 2001-08-09 02:14:53
Message-ID: 21149.997323293@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

pgsql-bugs(at)postgresql(dot)org writes:
> this works:
> select timestamp (content) from factversionelement where factid=100311 and elementname='newsdate';
> timestamp
> ------------------------
> 2010-01-02 16:00:00+01
> (1 row)

> this does not:
> select factid from factversionelement where factid=100311 and elementname='newsdate' and timestamp (content) >= '2001-08-08';
> ERROR: Bad timestamp external representation 'm'

What this looks like to me is that you have some row in the table that
has content = 'm' rather than a valid timestamp representation, but
does not have (both) factid=100311 and elementname='newsdate'. You
cannot assume that the WHERE clauses are evaluated in any particular
order.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2001-08-09 15:24:55 psql \d+ does not support tab completion as \d does.
Previous Message Thomas Lockhart 2001-08-09 00:10:01 Re: timestamp handling in postgres 7.1 behaves strange