Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 84EE047602A for ; Thu, 10 Oct 2002 05:11:05 -0400 (EDT) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by postgresql.org (Postfix) with SMTP id 4B6AA475EB2 for ; Thu, 10 Oct 2002 05:11:02 -0400 (EDT) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Thu Oct 10 11:11:02 2002 +0200 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id LAA05186; Thu, 10 Oct 2002 11:11:01 +0200 (METDST) Message-ID: <3DA54424.B48015F8@rodos.fzk.de> Date: Thu, 10 Oct 2002 11:11:00 +0200 From: Christoph Haller X-Mailer: Mozilla 4.06 [en] (X11; I; HP-UX B.10.20 9000/780) MIME-Version: 1.0 To: rafcio@polonium.de Cc: pgsql-sql@postgresql.org Subject: Re: SQL Error Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/131 X-Sequence-Number: 9848 > 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