A PostgreSQL system contains entity, record, and event data with JSONB attributes, status values, and timestamp-based access patterns. Create the recommended indexes for these workload patterns, then return their catalog definitions.
Output
- Return one row per requested index.
- Return columns
index_name and index_definition.
- Include the five requested indexes, ordered alphabetically by index name.
- The index definitions must show the verification schema used by the PostgreSQL catalog.
Output details
- Request
idx_entities_attributes_gin on entities using GIN over attributes.
- Request
idx_entities_external_code_hash on entities using HASH over external_code.
- Request
idx_events_occurred_at_brin on events using BRIN over occurred_at.
- Request
idx_records_entity_created_btree on records using BTREE over entity_id and descending created_at.
- Request
idx_records_active_partial on records using BTREE over descending created_at, restricted to status = 'active'.
- Use
gen_verify_7b5d2f1943 as the schema in every returned catalog definition, preserving PostgreSQL's normalized definition text.