Re: Transform for pl/perl

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Transform for pl/perl
Дата
Msg-id 5d7b91e8-ea88-6811-e215-e7ea1013dca9@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Transform for pl/perl  (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker))
Ответы Re: Transform for pl/perl  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
Список pgsql-hackers
On 4/10/18 10:31, Dagfinn Ilmari Mannsåker wrote:
> Also, it doesn't parse back in as jsonb either:
> 
>     =# select jsonbnan()::text::json;
>     ERROR:  invalid input syntax for type json
>     DETAIL:  Token "NaN" is invalid.
>     CONTEXT:  JSON data, line 1: NaN
> 
> And it's inconsistent with to_jsonb():
> 
>     =# select to_jsonb('nan'::numeric);
>     ┌──────────┐
>     │ to_jsonb │
>     ├──────────┤
>     │ "NaN"    │
>     └──────────┘
> 
> It would be highly weird if PL transforms (jsonb_plpython does the same
> thing) let you create spec-violating jsonb values that don't round-trip
> via jsonb_out/in.

Yeah this is not good.  Is there a way to do this in a centralized way?
Is there a function to check an internal jsonb value for consistency.
Should at least the jsonb output function check and not print invalid
values?

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


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

Предыдущее
От: Jim Finnerty
Дата:
Сообщение: Re: Should we add GUCs to allow partition pruning to be disabled?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Oddity in tuple routing for foreign partitions