Editorial question70.1K views3,706 votes0 answers2,947 following
AI-generatedCan a partial index on a jsonb column use ->> without casting in PostgreSQL 12?
The goal is to determine whether PostgreSQL 12 allows a partial index on a jsonb column that is defined using the ->> operator without an explicit cast. In PostgreSQL 11 a cast to text is required, while 12 accepts the operator directly, but the planner may still choose a sequential scan if the predicate includes a cast, resulting in suboptimal perform