From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Optimize get_jsonb_path_all avoiding an iterator |
Date: | 2019-09-20 22:37:20 |
Message-ID: | E1iBRWi-0002ov-Ha@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Optimize get_jsonb_path_all avoiding an iterator
Instead of creating an iterator object at each step down the JSONB
object/array, we can just just examine its object/array flags, which is
faster. Also, use the recently introduced JsonbValueAsText instead of
open-coding the same thing, for code simplicity.
Author: Nikita Glukhov
Discussion: https://postgr.es/m/7c417f90-f95f-247e-ba63-d95e39c0ad14@postgrespro.ru
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/dbb9aeda9959d8a8f463e841b69dfa04afc67a3a
Modified Files
--------------
src/backend/utils/adt/jsonfuncs.c | 33 ++++++++++-----------------------
1 file changed, 10 insertions(+), 23 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2019-09-20 23:23:03 | pgsql: Split out code into new getKeyJsonValueFromContainer() |
Previous Message | Tom Lane | 2019-09-20 18:23:06 | pgsql: Fix some minor spec-compliance issues in jsonpath lexer. |