mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
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
This commit is contained in:
@ -35,6 +35,8 @@ typedef struct
|
||||
#define PG_GETARG_JSONPATH_P_COPY(x) DatumGetJsonPathPCopy(PG_GETARG_DATUM(x))
|
||||
#define PG_RETURN_JSONPATH_P(p) PG_RETURN_POINTER(p)
|
||||
|
||||
#define jspIsScalar(type) ((type) >= jpiNull && (type) <= jpiBool)
|
||||
|
||||
/*
|
||||
* All node's type of jsonpath expression
|
||||
*/
|
||||
|
Reference in New Issue
Block a user