Re: fortnight interval support

From: Nathan Wagner <nw+pg(at)hydaspes(dot)if(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: fortnight interval support
Date: 2015-10-27 19:41:01
Message-ID: 20151027194101.GC6594@granicus.if.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 27, 2015 at 01:52:11PM +0000, Nathan Wagner wrote:
> On Mon, Oct 26, 2015 at 01:58:52PM -0400, Robert Haas wrote:
> > Aw, you're no fun. select '1 fortnight'::interval => '14 days' would be cool.
>
> Patch attached...

This isn't necessarily bad, but I observe that it would be difficult or
impossible to add fortnight support to intervals as an extension rather
than by modifying the scanner tables that the interval parser uses at
original compile time. You might be able to override symbols with a C
extension, but parts of the parser are static (in the C sense), so you'd
need to override and duplicate a lot of the existing functions. Of
course, a hookable interval parser is absurd in the first place.

--
nw

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gurjeet Singh 2015-10-27 19:48:36 Re: Limit GIST_MAX_SPLIT_PAGES to XLR_MAX_BLOCK_ID
Previous Message brown 2015-10-27 19:39:19 BUG #13741: vacuumdb does not accept valid password