X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 524FCD8C67 for ; Thu, 3 Nov 2005 13:22:39 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 81592-06 for ; Thu, 3 Nov 2005 17:22:34 +0000 (GMT) Received: from iracema.dnscenter.com.br (iracema3.dnscenter.com.br [67.15.81.2]) by svr1.postgresql.org (Postfix) with ESMTP id 8674DD87B1 for ; Thu, 3 Nov 2005 13:22:33 -0400 (AST) Received: from cpanel by iracema.dnscenter.com.br with local (Exim 4.52) id 1EXinF-0006Y5-80; Thu, 03 Nov 2005 14:22:29 -0300 Received: from 200.148.63.149 ([200.148.63.149]) by www.presserv.org (Horde MIME library) with HTTP; Thu, 03 Nov 2005 14:22:29 -0300 Message-ID: <20051103142229.d5bfubfxu8mc0cc0@www.presserv.org> Date: Thu, 03 Nov 2005 14:22:29 -0300 From: lucas@presserv.org To: Judith Altamirano Figueroa Cc: pgsql-sql@postgresql.org Subject: Re: date question References: <1131034672.3600.74.camel@Desarrollo> In-Reply-To: <1131034672.3600.74.camel@Desarrollo> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0.3) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - iracema.dnscenter.com.br X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [32001 502] / [47 12] X-AntiAbuse: Sender Address Domain - presserv.org X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.619 required=5 tests=[AWL=-1.081, NO_REAL_NAME=0.55, RCVD_IN_NJABL_PROXY=0.327, RCVD_IN_SORBS_SOCKS=1.823] X-Spam-Score: 1.619 X-Spam-Level: * X-Archive-Number: 200511/45 X-Sequence-Number: 23297 Quoting Judith Altamirano Figueroa : > Hi everybody, in Postgres 7.0.2 I have the next query: > SELECT * from clientes_proceso where fecha_mod::date <= now() -1; > but in version 8.0.1 returns the next error: > ERROR: The operator doesn't exist: timestamp with time zone - integer > How can drop a day to now()?? Try using "now()::date", or "interval". Like: select * from clientes_proceso where fecha_mod::date <= now()::date -1; or: select * from clientes_proceso where fecha_mod::date <= now() - '1 day'::interval; --- Lucas