Skip site navigation (1) Skip section navigation (2)

Re: BUG #2403: Date arithemtic using INTERVAL in UPDATE command

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Harry E(dot) Clarke" <Harry(dot)Clarke(at)metrosky(dot)co(dot)uk>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2403: Date arithemtic using INTERVAL in UPDATE command
Date: 2006-04-24 21:32:03
Message-ID: 6630.1145914323@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-advocacypgsql-bugs
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> That is definately a bug:
> 	test=> SELECT INTERVAL '100' YEAR;

We don't currently support that style of specifying interval constants,
and you shouldn't hold your breath expecting it to happen --- it will
require a whole bunch of abuse of the currently data-type-independent
processing of literal constants.  I don't think anyone's even thought
about it since Tom Lockhart stopped working on that part of the code.
The fact that the syntax is accepted at all is just because he had
done some preliminary work on the grammar, but there's no infrastructure
behind the grammar for handling it.

In short, you need to calibrate your expectations as "feature addition
someday", not "bug fix".

> As a work-around until we fix it, please use:
> 	test=> SELECT INTERVAL '100 year';

This is the syntax we support.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2006-04-25 00:09:12
Subject: Re: BUG #2403: Date arithemtic using INTERVAL in UPDATE command
Previous:From: Paul van der ZwanDate: 2006-04-24 20:18:29
Subject: BUG #2406: Not all systems support SHM_SHARE_MMU

pgsql-advocacy by date

Next:From: Alexandre LeclercDate: 2006-04-24 21:33:09
Subject: moving /data folder (win32, pgsql 8.1.3)
Previous:From: Jim NasbyDate: 2006-04-24 20:51:35
Subject: Fwd: [Fest-list] speaker timeslots open

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group