Support opclass_parameter in createIndex #1361
Labels
c: bug
Something isn't working
has workaround
Workaround provided or linked
help wanted
Extra attention is needed
p: 1-normal
Nothing urgent
Description
Sometimes one might want to set parameters for specific opclasses when creating an index.
E.g. when using the ltree extension, setting the
siglen
parameter can be crucial to performance of that index.Currently, the entire 'opclass' param is converted to
mOptions.literal
- which leads to postgres not finding the opclass at allcreates
which leads to
because postgres doesn't expect the opclass + parameter to be quoted
Suggested solution
Alternative
the sourcecode in 7.9.0 emits a warning when using opclass option and recommends a syntax that doesn't align with the exported type interface - but I think it could solve the issue.
The 8.0.0-rc code doesn't emit that warning but uses the same opclass syntax and conversion as 7.9.0
Additional context
Current workaround is to include the opclass and parameters in the column name becuase detecting braces
()
in the name would treat them as expression and not quote at allThe text was updated successfully, but these errors were encountered: