Re: Is there a better way to do this? - Mailing list pgsql-general

From D. Dante Lorenso
Subject Re: Is there a better way to do this?
Date
Msg-id 46D499E3.504@lorenso.com
Whole thread Raw
In response to Is there a better way to do this?  (Wei Weng <wweng@kencast.com>)
Responses Re: Is there a better way to do this?  (Michael Glaesemann <grzm@seespotcode.net>)
List pgsql-general
Wei Weng wrote:
> I want to implement something like the following:
> CREATE OR REPLACE FUNCTION AddDays

You don't know how many seconds are in a day, so just add the days using
SQL.

    RETURN time + (days || ' days')::INTERVAL;

You don't even need to make that a function, just do that you your SQL
directly.

-- Dante

pgsql-general by date:

Previous
From: "Rodrigo De León"
Date:
Subject: Re: Is there a better way to do this?
Next
From: Michael Glaesemann
Date:
Subject: Re: Is there a better way to do this?