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 9A9D49FB365 for ; Mon, 31 Jul 2006 12:36:36 -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 99305-10 for ; Mon, 31 Jul 2006 12:36:15 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id BD2999FA612 for ; Mon, 31 Jul 2006 12:35:30 -0300 (ADT) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1G7ZnJ-0001T0-N6 for pgsql-sql@postgresql.org; Mon, 31 Jul 2006 17:35:01 +0200 Received: from srv.protecting.net ([212.126.218.242]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 Jul 2006 17:35:01 +0200 Received: from hf0731x by srv.protecting.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 Jul 2006 17:35:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: Harald Fuchs Subject: Re: DBD::Pg ... how would I format this prepare? Date: 31 Jul 2006 17:30:14 +0200 Organization: Linux Private Site Lines: 19 Message-ID: References: <20060726182806.A1188@ganymede.hub.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: srv.protecting.net X-Archive: encrypt User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.816 tagged_above=0 required=5 tests=SPF_HELO_SOFTFAIL, SPF_SOFTFAIL X-Spam-Level: *** X-Archive-Number: 200607/378 X-Sequence-Number: 25952 In article <20060726182806.A1188@ganymede.hub.org>, "Marc G. Fournier" writes: > I need to do: > NOW() + '2 day'::interval > where 2 is a variable ... > if I do: > NOW() + '? day'::interval > it, of course, takes the ? as a literal ... so is there some way I can > do this such that I can do the placeholder? How about the following? now() + ? * '1 day'::interval