Received: from nogal (root@[194.75.91.82]) by hub.org (8.8.8/8.7.5) with SMTP id HAA18408 for ; Mon, 6 Jul 1998 07:10:08 -0400 (EDT) Received: from master.abrente.es by nogal (SMI-8.6/SMI-SVR4) id NAA02345; Mon, 6 Jul 1998 13:09:22 +0200 Sender: postgres@master.abrente.es Message-ID: <35A0B062.F6BB8097@master.abrente.es> Date: Mon, 06 Jul 1998 13:09:22 +0200 From: BD Postgres Reply-To: postgres@master.abrente.es Organization: Master en Telematica X-Mailer: Mozilla 4.05 [en] (X11; I; SunOS 5.5.1 sun4u) MIME-Version: 1.0 To: Aleksey Dashevsky , pgsql-sql@postgreSQL.org Subject: Re: [SQL] sql date functions References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Aleksey Dashevsky wrote: > I think you need to rewrite this query with something like: > > insert into table1 (date1,date2) values('1997-2-3'::date,'1997-2-3'::date > + '1 week'::timespan); > > You can also use standard SQL-92 syntax for type casting, e.x.: > cast ('1 week' as timespan ) > etc. You are right, but now postgres is reporting me that there is no '+' operator defined for time and timespan, but I have found that I can add integers to dates and they are threaded as days so I can solve my problem easily. Thank you very much! - Salva.