- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit911e702
committed
Implement operator class parameters
PostgreSQL provides set of template index access methods, where opclasses havemuch freedom in the semantics of indexing. These index AMs are GiST, GIN,SP-GiST and BRIN. There opclasses define representation of keys, operations onthem and supported search strategies. So, it's natural that opclasses may befaced some tradeoffs, which require user-side decision. This commit implementsopclass parameters allowing users to set some values, which tell opclass how toindex the particular dataset.This commit doesn't introduce new storage in system catalog. Instead it usespg_attribute.attoptions, which is used for table column storage options butunused for index attributes.In order to evade changing signature of each opclass support function, weimplement unified way to pass options to opclass support functions. Optionsare set to fn_expr as the constant bytea expression. It's possible due to thefact that opclass support functions are executed outside of expressions, sofn_expr is unused for them.This commit comes with some examples of opclass options usage. We parametrizesignature length in GiST. That applies to multiple opclasses: tsvector_ops,gist__intbig_ops, gist_ltree_ops, gist__ltree_ops, gist_trgm_ops andgist_hstore_ops. Also we parametrize maximum number of integer ranges forgist__int_ops. However, the main future usage of this feature is expectedto be json, where users would be able to specify which way to index particularjson parts.Catversion is bumped.Discussion:https://postgr.es/m/d22c3a18-31c7-1879-fc11-4c1ce2f5e5af%40postgrespro.ruAuthor: Nikita Glukhov, revised by meReviwed-by: Nikolay Shaplov, Robert Haas, Tom Lane, Tomas Vondra, Alvaro Herrera1 parent1d53432 commit911e702
File tree
108 files changed
+4063
-901
lines changed- contrib
- bloom
- hstore
- expected
- sql
- intarray
- expected
- sql
- ltree
- expected
- sql
- pg_trgm
- expected
- sql
- doc/src/sgml
- ref
- src
- backend
- access
- brin
- common
- gin
- gist
- hash
- index
- nbtree
- spgist
- catalog
- commands
- nodes
- optimizer/util
- parser
- utils
- adt
- cache
- fmgr
- include
- access
- catalog
- nodes
- utils
- test/regress
- expected
- input
- output
- sql
- tools/pgindent
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
108 files changed
+4063
-901
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 |
| - | |
| 25 | + | |
| 26 | + | |
26 | 27 |
| |
27 | 28 |
| |
28 | 29 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
109 | 109 |
| |
110 | 110 |
| |
111 | 111 |
| |
| 112 | + | |
112 | 113 |
| |
113 | 114 |
| |
114 | 115 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
108 | 108 |
| |
109 | 109 |
| |
110 | 110 |
| |
| 111 | + | |
| 112 | + | |
| 113 | + | |
111 | 114 |
| |
112 | 115 |
| |
113 | 116 |
| |
| |||
204 | 207 |
| |
205 | 208 |
| |
206 | 209 |
| |
| 210 | + | |
| 211 | + | |
207 | 212 |
| |
208 | 213 |
| |
209 | 214 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| 14 | + | |
14 | 15 |
| |
15 | 16 |
| |
16 | 17 |
| |
|
Lines changed: 45 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1344 | 1344 |
| |
1345 | 1345 |
| |
1346 | 1346 |
| |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
1347 | 1392 |
| |
1348 | 1393 |
| |
1349 | 1394 |
| |
|
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + |
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 |
| - | |
| 3 | + | |
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
|
0 commit comments
Comments
(0)