Re: SQL Error

From: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
To: rafcio(at)polonium(dot)de
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: SQL Error
Date: 2002-10-10 09:11:00
Message-ID: 3DA54424.B48015F8@rodos.fzk.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> CREATE TABLE "scheduler_action" (
> "scheduler_action_id" numeric(30) NOT NULL,
> "action_type" numeric(4) NOT NULL,
> "priority" numeric(4) NOT NULL,
> "referenced_id" numeric(30) NOT NULL,
> "invocation_date" numeric(30) NOT NULL,
> "is_done" numeric(1) NOT NULL,
> PRIMARY KEY ("scheduler_action_id")
> );
>
> My quety look so:
>
> select t0_o.scheduler_action_id from scheduler_action t0_o where
> t0_o.is_done = 0 and t0_o.invocation_date <= 1034033214921
>
> And I get following error:
>
> ERROR: Unable to identify an operator '<=' for types 'numeric' and
'double
> precision'
> You will have to retype this query using an explicit cast
>
> But if my query looks like:
>
> select t0_o.scheduler_action_id from scheduler_action t0_o where
> t0_o.is_done = 0 and t0_o.invocation_date <= '1034033214921'
>
> "invocation_date" is numeric with p=30 and s=0.
>
I've got the same error message on
select version();
version
---------------------------------------------------------------
PostgreSQL 7.2.1 on hppa-hp-hpux10.20, compiled by GCC 2.95.2

but
select t0_o.scheduler_action_id from scheduler_action t0_o where
template1-# t0_o.is_done = 0 and t0_o.invocation_date <=
1034033214921::numeric ;
did work;
I cannot see why this is necessary, and I cannot understand why nobody
else
replied to both of your requests.

Regards, Christoph

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Achilleus Mantzios 2002-10-10 11:23:23 Re: SQL Error
Previous Message Achilleus Mantzios 2002-10-10 09:01:38 Re: Viewing stored procedure code