forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit72b6460
committed
Partial implementation of SQL/JSON path language
SQL 2016 standards among other things contains set of SQL/JSON features forJSON processing inside of relational database. The core of SQL/JSON is JSONpath language, allowing access parts of JSON documents and make computationsover them. This commit implements partial support JSON path language asseparate datatype called "jsonpath". The implementation is partial becauseit's lacking datetime support and suppression of numeric errors. Missingfeatures will be added later by separate commits.Support of SQL/JSON features requires implementation of separate nodes, and itwill be considered in subsequent patches. This commit includes followingset of plain functions, allowing to execute jsonpath over jsonb values: * jsonb_path_exists(jsonb, jsonpath[, jsonb, bool]), * jsonb_path_match(jsonb, jsonpath[, jsonb, bool]), * jsonb_path_query(jsonb, jsonpath[, jsonb, bool]), * jsonb_path_query_array(jsonb, jsonpath[, jsonb, bool]). * jsonb_path_query_first(jsonb, jsonpath[, jsonb, bool]).This commit also implements "jsonb @? jsonpath" and "jsonb @@ jsonpath", whichare wrappers over jsonpath_exists(jsonb, jsonpath) and jsonpath_predicate(jsonb,jsonpath) correspondingly. These operators will have an index support(implemented in subsequent patches).Catversion bumped, to add new functions and operators.Code was written by Nikita Glukhov and Teodor Sigaev, revised by me.Documentation was written by Oleg Bartunov and Liudmila Mantrova. The workwas inspired by Oleg Bartunov.Discussion:https://postgr.es/m/fcc6fc6a-b497-f39a-923d-aa34d0c588e8%402ndQuadrant.comAuthor: Nikita Glukhov, Teodor Sigaev, Alexander Korotkov, Oleg Bartunov, Liudmila MantrovaReviewed-by: Tomas Vondra, Andrew Dunstan, Pavel Stehule, Alexander Korotkov1 parent893d6f8 commit72b6460
File tree
33 files changed
+9079
-55
lines changed- doc/src/sgml
- src
- backend
- catalog
- utils
- adt
- include
- catalog
- regex
- utils
- test/regress
- expected
- sql
- tools
- msvc
- pgindent
33 files changed
+9079
-55
lines changedLines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
136 | 136 |
| |
137 | 137 |
| |
138 | 138 |
| |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
139 | 150 |
| |
140 | 151 |
| |
141 | 152 |
| |
|
0 commit comments
Comments
(0)