]> granicus.if.org Git - postgresql/commit
Optimize get_jsonb_path_all avoiding an iterator
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 20 Sep 2019 22:18:24 +0000 (19:18 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 20 Sep 2019 22:31:32 +0000 (19:31 -0300)
commitdbb9aeda9959d8a8f463e841b69dfa04afc67a3a
tree736ab0689e69f58e54cf9d12b81bed6f5f90c3fb
parentabb014a63106653f2872a3b1662a79ab80d4dcbb
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
src/backend/utils/adt/jsonfuncs.c