I can't do typecasting... - Mailing list pgsql-bugs

From David Sauer
Subject I can't do typecasting...
Date
Msg-id m2wvs1vuub.fsf@chameleon.localdomain
Whole thread Raw
List pgsql-bugs
Hello,
  I have following problem and I think, that it is a bug:

jelly=> select 'now'::abstime < 'now'::abstime;
?column?
--------
f
(1 row)

** works fine ...

jelly=> select 'now'::abstime < now();
ERROR:  Unable to identify an operator '<' for types 'abstime' and 'timestamp'
    You will have to retype this query using an explicit cast

** ok, now () returns timestamp ...

jelly=> select 'now'::abstime < abstime(now());
ERROR:  Unable to identify an operator '<' for types 'abstime' and 'timestamp'
    You will have to retype this query using an explicit cast
jelly=> select 'now'::abstime < now()::abstime;
ERROR:  Unable to identify an operator '<' for types 'abstime' and 'timestamp'
    You will have to retype this query using an explicit cast
jelly=> select 'now'::abstime < (now()::abstime);
ERROR:  Unable to identify an operator '<' for types 'abstime' and 'timestamp'
    You will have to retype this query using an explicit cast

** but typecasting from timestamp -> abstime seems doesn't work ...

I'am using:

Welcome to the POSTGRESQL interactive sql monitor:
  Please read the file COPYRIGHT for copyright terms of POSTGRESQL
[PostgreSQL 6.5.2 on i586-pc-linux-gnu, compiled by gcc 2.95.1]

System is RH 6.1 with glibc 2.1.2.

                                thanks,


--
* David Sauer, student of Czech Technical University
* electronic mail: davids@penguin.cz (mime compatible)

pgsql-bugs by date:

Previous
From: Hannu Krosing
Date:
Subject: A bug in NOT IN (SELECT ...
Next
From: Jerome ALET
Date:
Subject: shmget again ...