Re: [PATCH] Generalized JSON output functions

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [PATCH] Generalized JSON output functions
Дата
Msg-id 20150717151546.GS2301@postgresql.org
обсуждение исходный текст
Ответ на Re: [PATCH] Generalized JSON output functions  ("Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>)
Список pgsql-hackers
Shulgin, Oleksandr wrote:
> On Jul 17, 2015 4:31 PM, "Andrew Dunstan" <andrew@dunslane.net> wrote:

> > Incidentally, this doesn't look acceptable anyway:
> >>
> >> !  es->json_cxt.value(&es->json_cxt, num, JSONTYPE_NUMERIC,
> >> !  NUMERICOID, 1702 /* numeric_out */);
> >
> > We don't hardcode function oids elsewhere. So this is also something that
> > makes the patch unacceptable.
> 
> Well, good to know (I believe I've asked about this in the first mail
> specifically).
> 
> Is there any way a built-in function oid would change/differ on different
> server versions? What would be the recommended way to do this?

C'mon, that's a trivial problem.  Just use getTypeOutputInfo();
numeric's OID is hardcoded as NUMERICOID.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Petr Jelinek
Дата:
Сообщение: Re: TABLESAMPLE patch is really in pretty sad shape
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [PATCH] Generalized JSON output functions