You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to be able see if an index is partial and what the clause is.
For index_is_partial, we can get that with:
SELECTx.indpredIS NOT NULLFROMpg_catalog.pg_index x
JOINpg_catalog.pg_class ct ONct.oid=x.indrelidJOINpg_catalog.pg_class ci ONci.oid=x.indexrelidJOINpg_catalog.pg_namespace n ONn.oid=ct.relnamespaceWHEREct.relname= $table
ANDci.relname= $index
ANDn.nspname= $schema;
For index_partial_clause_is, we can get the string for the partial clause as:
SELECT pg_get_expr(x.indpred, x.indrelid)
FROMpg_catalog.pg_index x
JOINpg_catalog.pg_class ct ONct.oid=x.indrelidJOINpg_catalog.pg_class ci ONci.oid=x.indexrelidJOINpg_catalog.pg_namespace n ONn.oid=ct.relnamespaceWHEREct.relname= $table
ANDci.relname= $index
ANDn.nspname= $schema;
The text was updated successfully, but these errors were encountered:
It would be useful to be able see if an index is partial and what the clause is.
For
index_is_partial
, we can get that with:For
index_partial_clause_is
, we can get the string for the partial clause as:The text was updated successfully, but these errors were encountered: