Re: jsonpath

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: jsonpath
Дата
Msg-id CAPpHfdtcO+VCoKTMpSUL9LVzqHv7uthi-jAdzYTxaHc1+h6fVQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: jsonpath  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Ответы Re: jsonpath  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Список pgsql-hackers
On Sun, Jan 20, 2019 at 2:45 AM Alexander Korotkov
<a.korotkov@postgrespro.ru> wrote:
> 3) How do we calculate the "id" property returned by keyvalue()
> function?  It's not documented.  Even presence of "id" columns isn't
> documented.  Standard stands that it's implementation-depended
> indetifier of object holding key-value pair.  The way of its
> calculation is also not clear from the code.  Why do we need constant
> of 10000000000?
>
>                 id = jb->type != jbvBinary ? 0 :
>                     (int64)((char *) jb->val.binary.data -
>                             (char *) cxt->baseObject.jbc);
>                 id += (int64) cxt->baseObject.id * INT64CONST(10000000000);

I've revising patchset bringing it to commitable shape.  The
intermediate result is attached.

0001-Preliminary-datetime-infrastructure-v24.patch

* Commit message & minor cleanup

0002-Jsonpath-engine-and-docs-v24.patch

 * Support of json is removed.  Current implementation is tricky and
cumbersome.  We need to design a suitable abstraction layer for that.
It should be done by separate patch applying not only to jsonpath, but
also to other jsonb functions lacking of json analogues.
* jsonpath_exists(jsonb, jsonpath[, jsonb]), jsonpath_predicate(jsonb,
jsonpath[, jsonb]), jsonpath_query(jsonb, jsonpath[, jsonb]),
jsonpath_wrapped(jsonb, jsonpath[, jsonb]) are documented.
* @* and @# operators are removed, @~ operator is renamed to @@.
* Commit message & minor cleanup.

I'll continue revising this patchset.  Nikita, could you please write
tests for 3-argument versions of functions?  Also, please answer the
question regarding "id" property.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Вложения

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

Предыдущее
От: Paul Martinez
Дата:
Сообщение: Re: [PROPOSAL] ON DELETE SET NULL () for Foreign Key Constraints
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [PATCH] Fix Proposal - Deadlock Issue in Single User Mode When IOFailure Occurs