X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E047356505 for ; Wed, 9 Mar 2005 14:03:14 +0000 (GMT) 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 22663-05 for ; Wed, 9 Mar 2005 14:03:13 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 798085651E for ; Wed, 9 Mar 2005 14:03:11 +0000 (GMT) Received: (qmail 32068 invoked by uid 500); 9 Mar 2005 14:19:08 -0000 Date: Wed, 9 Mar 2005 08:19:08 -0600 From: Bruno Wolff III To: Fatih Cerit Cc: pgsql-sql@postgresql.org Subject: Re: interval +variable Message-ID: <20050309141908.GA32013@wolff.to> Mail-Followup-To: Bruno Wolff III , Fatih Cerit , pgsql-sql@postgresql.org References: <008a01c52486$1c1c9520$bb41ccd5@cerit> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <008a01c52486$1c1c9520$bb41ccd5@cerit> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/149 X-Sequence-Number: 20628 On Wed, Mar 09, 2005 at 10:58:05 +0200, Fatih Cerit wrote: > Dear all > > Is there anyone at there who knows howto use dateadd in pgsql. I have a > problem in my function that is like this ; > > Select into futuredate now() + interval '30 days'; <- this is ok > but how can I use a variable intead of '30 days' :( A better solution may to be to use the date type instead of the timestamp type. Then you can just add an integer number to the date. You also don't have to worry about daylight savings time changes.