Re: fortnight interval support

Поиск
Список
Период
Сортировка
От Nathan Wagner
Тема Re: fortnight interval support
Дата
Msg-id 20151027194101.GC6594@granicus.if.org
обсуждение исходный текст
Ответ на fortnight interval support  (Nathan Wagner <nw+pg@hydaspes.if.org>)
Список 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 по дате отправления:

Предыдущее
От: Nathan Wagner
Дата:
Сообщение: Re: fortnight interval support
Следующее
От: Gurjeet Singh
Дата:
Сообщение: Re: Limit GIST_MAX_SPLIT_PAGES to XLR_MAX_BLOCK_ID