-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: fix the column pg_index.indclass #26504
Copy link
Copy link
Closed
Labels
A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Milestone
Description
PostgreSQL specifies pg_index.indclass to be an OIDVECTOR.
CockroachDB currently sets it to INT.
As per https://www.postgresql.org/docs/10/static/catalog-pg-index.html:
For each column in the index key, this contains the OID of the operator class to use. See pg_opclass for details
Needed to support the following query listed in #16971:
SELECT
indexrelid,
(information_schema._pg_expandarray(indclass)).x AS operator_argument_type_oid,
(information_schema._pg_expandarray(indclass)).n AS operator_argument_position
FROM
pg_index
with the changes in #26503
cc @jordanlewis
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.