]> granicus.if.org Git - postgresql/commit
GIN support for @@ and @? jsonpath operators
authorAlexander Korotkov <akorotkov@postgresql.org>
Mon, 1 Apr 2019 15:08:15 +0000 (18:08 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Mon, 1 Apr 2019 15:08:52 +0000 (18:08 +0300)
commit0a02e2ae0236103e641f6570b8135b7ee8a83686
treecadb8ce44a18a12bc462448b79e5f636863e0f03
parent7241911782a7420e38b6e50b57d304ea48bc5362
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
doc/src/sgml/gin.sgml
doc/src/sgml/json.sgml
src/backend/utils/adt/jsonb_gin.c
src/include/catalog/catversion.h
src/include/catalog/pg_amop.dat
src/include/utils/jsonb.h
src/include/utils/jsonpath.h
src/test/regress/expected/jsonb.out
src/test/regress/expected/opr_sanity.out
src/test/regress/sql/jsonb.sql
src/tools/pgindent/typedefs.list