Re: intervals - Mailing list pgsql-sql

From Michael Glaesemann
Subject Re: intervals
Date
Msg-id 1EB4ED36-3679-4E6F-B065-911BCB7F518D@seespotcode.net
Whole thread Raw
In response to Re: intervals  (bricklen <bricklen@gmail.com>)
List pgsql-sql
On Nov 3, 2011, at 13:43, bricklen wrote:

> 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;

good.

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

bad.

Michael Glaesemann
grzm seespotcode net





pgsql-sql by date:

Previous
From: "Edward W. Rouse"
Date:
Subject: Re: intervals
Next
From: Russell Keane
Date:
Subject: Create Type with typmod_in