Postgres stores index names with uppercase characters in the pg_index catalog using the quoted version of the name. For example:
"idx_USERS_name"
whereas a lowercase index name would be stored as:
idx_users_name
This is different to how other object types are stored in their respective catalogs. For example, table names are stored in thepg_class catalog without quotes, regardless of whether they contain uppercase characters.
This makes it necessary to strip quotes from index names when retrieving them from the pg_index catalog when building the internal schema representation.
Fixes https://github.com/xataio/pgroll/issues/355
Postgres stores index names with uppercase characters in the
pg_index
catalog using the quoted version of the name. For example:whereas a lowercase index name would be stored as:
This is different to how other object types are stored in their respective catalogs. For example, table names are stored in the
pg_class
catalog without quotes, regardless of whether they contain uppercase characters.This makes it necessary to strip quotes from index names when retrieving them from the
pg_index
catalog when building the internal schema representation.