Fix assertion if index is dropped during REFRESH CONCURRENTLY
authorHeikki Linnakangas <[email protected]>
Mon, 5 Feb 2024 09:01:30 +0000 (11:01 +0200)
committerHeikki Linnakangas <[email protected]>
Mon, 5 Feb 2024 09:03:43 +0000 (11:03 +0200)
commita45c950ae35e53de4007c9dd0991d5005a4bee7b
treeb578e715712036aeb5ba4eecd4e9d6c60cfc4ac1
parentf4f2883521fc3f81765ab82eab2ffa31574f0a07
Fix assertion if index is dropped during REFRESH CONCURRENTLY

When assertions are disabled, the built SQL statement is invalid and
you get a "syntax error". So this isn't a serious problem, but let's
avoid the assertion failure.

Backpatch to all supported versions.

Reviewed-by: Noah Misch
src/backend/commands/matview.c
src/test/regress/expected/matview.out
src/test/regress/sql/matview.sql