summaryrefslogtreecommitdiff
path: root/src/tools/pgindent
diff options
context:
space:
mode:
authorAlexander Korotkov2020-03-30 16:17:11 +0000
committerAlexander Korotkov2020-03-30 16:17:23 +0000
commit911e70207703799605f5a0e8aad9f06cff067c63 (patch)
tree5cdbffea1945c2c0b766db195a55bcb372d60537 /src/tools/pgindent
parent1d53432ff940b789c2431ba476a2a6e2db3edf84 (diff)
Implement operator class parameters
PostgreSQL provides set of template index access methods, where opclasses have much freedom in the semantics of indexing. These index AMs are GiST, GIN, SP-GiST and BRIN. There opclasses define representation of keys, operations on them and supported search strategies. So, it's natural that opclasses may be faced some tradeoffs, which require user-side decision. This commit implements opclass parameters allowing users to set some values, which tell opclass how to index the particular dataset. This commit doesn't introduce new storage in system catalog. Instead it uses pg_attribute.attoptions, which is used for table column storage options but unused for index attributes. In order to evade changing signature of each opclass support function, we implement unified way to pass options to opclass support functions. Options are set to fn_expr as the constant bytea expression. It's possible due to the fact that opclass support functions are executed outside of expressions, so fn_expr is unused for them. This commit comes with some examples of opclass options usage. We parametrize signature length in GiST. That applies to multiple opclasses: tsvector_ops, gist__intbig_ops, gist_ltree_ops, gist__ltree_ops, gist_trgm_ops and gist_hstore_ops. Also we parametrize maximum number of integer ranges for gist__int_ops. However, the main future usage of this feature is expected to be json, where users would be able to specify which way to index particular json parts. Catversion is bumped. Discussion: https://postgr.es/m/d22c3a18-31c7-1879-fc11-4c1ce2f5e5af%40postgrespro.ru Author: Nikita Glukhov, revised by me Reviwed-by: Nikolay Shaplov, Robert Haas, Tom Lane, Tomas Vondra, Alvaro Herrera
Diffstat (limited to 'src/tools/pgindent')
-rw-r--r--src/tools/pgindent/typedefs.list11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list
index ccc34ee2ac6..587b040532a 100644
--- a/src/tools/pgindent/typedefs.list
+++ b/src/tools/pgindent/typedefs.list
@@ -841,6 +841,8 @@ GISTBuildState
GISTENTRY
GISTInsertStack
GISTInsertState
+GISTIntArrayBigOptions
+GISTIntArrayOptions
GISTNodeBuffer
GISTNodeBufferPage
GISTPageOpaque
@@ -908,11 +910,13 @@ GinVacuumState
GistBufferingMode
GistBulkDeleteResult
GistEntryVector
+GistHstoreOptions
GistInetKey
GistNSN
GistOptBufferingMode
GistSplitUnion
GistSplitVector
+GistTsVectorOptions
GistVacState
GlobalTransaction
GrantRoleStmt
@@ -1303,6 +1307,8 @@ LogicalRepWorkerId
LogicalRewriteMappingData
LogicalTape
LogicalTapeSet
+LtreeGistOptions
+LtreeSignature
MAGIC
MBuf
MCVItem
@@ -2477,6 +2483,7 @@ TrgmArcInfo
TrgmBound
TrgmColor
TrgmColorInfo
+TrgmGistOptions
TrgmNFA
TrgmPackArcInfo
TrgmPackedArc
@@ -2875,6 +2882,7 @@ file_action_t
file_entry_t
file_type_t
filemap_t
+fill_string_relopt
finalize_primnode_context
find_dependent_phvs_context
find_expr_references_context
@@ -2998,6 +3006,8 @@ leaf_item
line_t
lineno_t
list_qsort_comparator
+local_relopt
+local_relopts
locale_t
locate_agg_of_level_context
locate_var_of_level_context
@@ -3196,6 +3206,7 @@ relopt_real
relopt_string
relopt_type
relopt_value
+relopts_validator
remoteConn
remoteConnHashEnt
remoteDep