On Mon, Dec 16, 2013 at 2:08 AM, John R Pierce <pie...@hogranch.com> wrote:
> On 12/15/2013 10:54 PM, Thomas Kellerer wrote:
>>
>> Both are valid. interval '2' day is the ANSI SQL format though.
>
>
> oh, really!   ah, I stand corrected, didn't realize the units were valid
> keywords like that.

Me neither.   Stuff like this is black magic implemented in the
parser...I always avoid it when I can.  I would have done it like
this:

newexpdate := CURRENT_TIMESTAMP +  (expdays || ' days')::interval;

merlin


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to