Re: fortnight interval support - Mailing list pgsql-hackers

From Nathan Wagner
Subject Re: fortnight interval support
Date
Msg-id 20151027194101.GC6594@granicus.if.org
Whole thread Raw
In response to fortnight interval support  (Nathan Wagner <nw+pg@hydaspes.if.org>)
List 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



pgsql-hackers by date:

Previous
From: Nathan Wagner
Date:
Subject: Re: fortnight interval support
Next
From: Gurjeet Singh
Date:
Subject: Re: Limit GIST_MAX_SPLIT_PAGES to XLR_MAX_BLOCK_ID