[PATCH] tests: verify renamed index functionality in alter_table - Mailing list pgsql-hackers

From Dharin Shah
Subject [PATCH] tests: verify renamed index functionality in alter_table
Date
Msg-id CAOj6k6f5nmzV-tudS=jvtPEn+-c54NzVmW3usV70DiMT8YqytQ@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hello,
 
The alter_table test has a FIXME saying the index rename test should verify the index still works afterward. Currently it only checks that ALTER INDEX RENAME succeeds, not that the renamed index is usable.

-- ALTER TABLE ... RENAME on non-table relations
-- renaming indexes (FIXME: this should probably test the index's functionality)

This patch adds a simple verification: EXPLAIN to show the planner finds the index, and a SELECT to confirm it returns correct data. Uses the standard enable_seqscan/bitmapscan/indexonlyscan=off pattern to force a stable Index Scan across environments.

Test-only change. Verified with:
- make check TESTS=alter_table  # passes
- make check  # all 236 tests pass

Thanks,
Dharin
Attachment

pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Implement waiting for wal lsn replay: reloaded
Next
From: Jelte Fennema-Nio
Date:
Subject: Re: remove pg_restrict workaround