X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 1B4BD9FB26A for ; Tue, 8 Aug 2006 18:44:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 45087-08 for ; Tue, 8 Aug 2006 18:44:00 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from talk.nabble.com (www.nabble.com [72.21.53.35]) by postgresql.org (Postfix) with ESMTP id 15B139FA463 for ; Tue, 8 Aug 2006 18:44:01 -0300 (ADT) Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1GAZMl-0007oo-Tv for pgsql-sql@postgresql.org; Tue, 08 Aug 2006 14:43:59 -0700 Message-ID: <5715425.post@talk.nabble.com> Date: Tue, 8 Aug 2006 14:27:39 -0700 (PDT) From: chrisj To: pgsql-sql@postgresql.org Subject: date arithmetic MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-Sender: chrisj.wood@sympatico.ca X-Nabble-From: chrisj X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200608/67 X-Sequence-Number: 26025 Hi ALL, I want to do date arithmetic in SQL with a column that is integer. example create table bob ( col1 timestamp , col2 int4 ; where col2 represents a number of minutes. I want to do something like select col1 + interval col2 minutes from bob This is doable with most other RDBMS (DB2, Oracle MS SQL) what am I missing?? I know one option is to create col2 as interval, but does not work for me. How can I cast int4 to "interval minutes" -- View this message in context: http://www.nabble.com/date-arithmetic-tf2075353.html#a5715425 Sent from the PostgreSQL - sql forum at Nabble.com.