Re: intervals

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: bricklen <bricklen(at)gmail(dot)com>
Cc: "Edward W(dot) Rouse" <erouse(at)comsquared(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: intervals
Date: 2011-11-03 18:20:40
Message-ID: 1EB4ED36-3679-4E6F-B065-911BCB7F518D@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Nov 3, 2011, at 13:43, bricklen wrote:

> On Thu, Nov 3, 2011 at 10:29 AM, Edward W. Rouse <erouse(at)comsquared(dot)com> wrote:
>> expire := '% days'::interval, limit;
>
> A couple ways spring to mind immediately. Using 10 as the example:
>
> expire := 10 * '1 day'::INTERVAL;

good.

> expire := ('10' || ' days')::INTERVAL;

bad.

Michael Glaesemann
grzm seespotcode net

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Russell Keane 2011-11-04 14:01:49 Create Type with typmod_in
Previous Message Edward W. Rouse 2011-11-03 17:59:08 Re: intervals