From: Edward W. Rouse <erouse@comsquared.com>
To: pgsql-sql@postgresql.org
Subject: Re: intervals
Date: Thu, 3 Nov 2011 13:59:08 -0400
Message-ID: <00f601cc9a52$48e450e0$daacf2a0$@com> (raw)
In-Reply-To: <CAGrpgQ9GwvTi_ywmdAJUzRfoVRxwgAD9U87NURqqw-BWeoYNLQ@mail.gmail.com>
References: <00ee01cc9a4e$2b41f050$81c5d0f0$@com>
<CAGrpgQ9GwvTi_ywmdAJUzRfoVRxwgAD9U87NURqqw-BWeoYNLQ@mail.gmail.com>
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
>
> On Thu, Nov 3, 2011 at 10:29 AM, Edward W. Rouse
> <erouse@comsquared.com> wrote:
> > expire := '% days'::interval, limit;
>
> A couple ways spring to mind immediately. Using 10 as the example:
>
> expire := 10 * '1 day'::INTERVAL;
> expire := ('10' || ' days')::INTERVAL;
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: erouse@comsquared.com
Subject: Re: intervals
In-Reply-To: <00f601cc9a52$48e450e0$daacf2a0$@com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox