Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 800EEB5DC4A for ; Thu, 3 Nov 2011 14:59:20 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 28422-08 for ; Thu, 3 Nov 2011 17:59:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from smtp.comsquared.com (smtp.comsquared.com [209.155.237.140]) by mail.postgresql.org (Postfix) with ESMTP id 5C9D1B5DC46 for ; Thu, 3 Nov 2011 14:59:13 -0300 (ADT) Received: from mdpserv.comsquared.com (mdpserv [10.82.40.1]) by smtp.comsquared.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id pA3Hx83W008059 for ; Thu, 3 Nov 2011 13:59:11 -0400 (EDT) Received: from erouse052008 ([10.82.60.61]) by mdpserv.comsquared.com (8.13.6+Sun/8.13.6) with ESMTP id pA3Hx82j028271 for ; Thu, 3 Nov 2011 13:59:08 -0400 (EDT) From: "Edward W. Rouse" To: References: <00ee01cc9a4e$2b41f050$81c5d0f0$@com> In-Reply-To: Subject: Re: intervals Date: Thu, 3 Nov 2011 13:59:08 -0400 Message-ID: <00f601cc9a52$48e450e0$daacf2a0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcyaUDJewOTr24kRTDiHOvRPyoNjZgAAa3UQ Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-3.101 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-1.201 X-Spam-Level: X-Archive-Number: 201111/9 X-Sequence-Number: 35982 In conjunction with Jonathan, this has gotten me to the point where it = works, sort of. Now I just need to change it so that it does more than 1 = at a time. Since it currently isn't in a loop, it affects one and quits. = But I needed to get it to do that first, putting it in a loop should be = the easy part. Thanks. > -----Original Message----- > From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql- > owner@postgresql.org] On Behalf Of bricklen > Sent: Thursday, November 03, 2011 1:44 PM > To: Edward W. Rouse > Cc: pgsql-sql@postgresql.org > Subject: Re: [SQL] intervals >=20 > On Thu, Nov 3, 2011 at 10:29 AM, Edward W. Rouse > wrote: > > expire :=3D '% days'::interval, limit; >=20 > A couple ways spring to mind immediately. Using 10 as the example: >=20 > expire :=3D 10 * '1 day'::INTERVAL; > expire :=3D ('10' || ' days')::INTERVAL; >=20 > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql