Thread: pgsql: GIN support for @@ and @? jsonpath operators
GIN support for @@ and @? jsonpath operators This commit makes existing GIN operator classes jsonb_ops and json_path_ops support "jsonb @@ jsonpath" and "jsonb @? jsonpath" operators. Basic idea is to extract statements of following form out of jsonpath. key1.key2. ... .keyN = const The rest of jsonpath is rechecked from heap. Catversion is bumped. Discussion: https://postgr.es/m/fcc6fc6a-b497-f39a-923d-aa34d0c588e8%402ndQuadrant.com Author: Nikita Glukhov, Alexander Korotkov Reviewed-by: Jonathan Katz, Pavel Stehule Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/0a02e2ae0236103e641f6570b8135b7ee8a83686 Modified Files -------------- doc/src/sgml/gin.sgml | 4 + doc/src/sgml/json.sgml | 19 +- src/backend/utils/adt/jsonb_gin.c | 948 ++++++++++++++++++++++++++++--- src/include/catalog/catversion.h | 2 +- src/include/catalog/pg_amop.dat | 12 + src/include/utils/jsonb.h | 3 + src/include/utils/jsonpath.h | 2 + src/test/regress/expected/jsonb.out | 453 +++++++++++++++ src/test/regress/expected/opr_sanity.out | 4 +- src/test/regress/sql/jsonb.sql | 79 +++ src/tools/pgindent/typedefs.list | 8 + 11 files changed, 1456 insertions(+), 78 deletions(-)