Re: JSON Functions and Operators Docs for v15

Поиск
Список
Период
Сортировка
От Erik Rijkers
Тема Re: JSON Functions and Operators Docs for v15
Дата
Msg-id 261c38ff-6ead-a610-31f3-05857702c804@xs4all.nl
обсуждение исходный текст
Ответ на Re: JSON Functions and Operators Docs for v15  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: JSON Functions and Operators Docs for v15  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Op 16-05-2022 om 16:49 schreef Andrew Dunstan:

> [sqljson-dox-rework-2.patch]

Two issues, derived from func.sgml:

-----
1.

I noticed that some json functions, for instance json_object(), in their 
output insert unexpected spaces before the separator-colon:

testdb=# select json_object('{a, 1, b, "def", c, 3.5}');

               json_object
---------------------------------------
  {"a" : "1", "b" : "def", "c" : "3.5"}
(1 row)

instead of the expected
  {"a": "1", "b": "def", "c": "3.5"}

Of course not outright wrong but wouldn't it make more sense to 
normalize such output?  There is here no reason in the input to space 
the colon on both sides.

Functions that yield this peculiarly spaced output are:
   json_object
   json_objectagg
   json_build_object

-----
2.

This example in func.sgml says it gives 't' but on my instance it 
returns 'f'.  Is the example correct?

jsonb_path_exists_tz('["2015-08-01 12:00:00 -05"]', '$[*] ? 
(@.datetime() < "2015-08-02".datetime())') → t


Thanks,

Erik


> andrew
> 
> --
> Andrew Dunstan
> EDB: https://www.enterprisedb.com



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: postgres_fdw versus regconfig and similar constants
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: JSON Functions and Operators Docs for v15