Re: JSON path decimal literal syntax

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: JSON path decimal literal syntax
Дата
Msg-id 9a5fc38c-6a2f-e4d6-a917-fc3cd40dbeed@enterprisedb.com
обсуждение исходный текст
Ответ на Re: JSON path decimal literal syntax  (Nikita Glukhov <n.gluhov@postgrespro.ru>)
Список pgsql-hackers
On 06.03.22 02:43, Nikita Glukhov wrote:
> Obviously, there are compatibility issues with expressions like
> '1.type()', which will start to require parentheses around numbers,
> but they seem to be useful only for our regression tests.
> 
> The corresponding changes in jsonpath_out() related to parentheses
> are missing in the v2 patch:
> 
> =# select '(1).a'::jsonpath;
>   jsonpath
> ----------
>   1."a"
> (1 row)
> 
> =# select '(1).a'::jsonpath::text::jsonpath;
> ERROR:  syntax error, unexpected STRING_P, expecting $end at or near """ of jsonpath input
> 
> 
> I have added in v3 enclosing of numbers in parentheses if they have
> successive path items. (Changed results of several test cases, one test
> case added.)

Thank you for these insights.  I have integrated this into my patch and 
updated the commit message to point out the change.
Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Granting SET and ALTER SYSTE privileges for GUCs
Следующее
От: Mark Dilger
Дата:
Сообщение: Re: Granting SET and ALTER SYSTE privileges for GUCs