I can't do typecasting...

From: David Sauer <davids(at)penguin(dot)cz>
To: pgsql-bugs(at)postgresql(dot)org
Subject: I can't do typecasting...
Date: 1999-11-02 14:20:12
Message-ID: m2wvs1vuub.fsf@chameleon.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)penguin(dot)cz (mime compatible)

Browse pgsql-bugs by date

  From Date Subject
Next Message Jerome ALET 1999-11-02 15:35:01 shmget again ...
Previous Message Hannu Krosing 1999-11-02 08:11:55 A bug in NOT IN (SELECT ...