mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Support amcheck of sequences
Sequences were left out of the list of relation kinds that verify_heapam knew how to check, though it is fairly trivial to allow them. Doing that, and while at it, updating pg_amcheck to include sequences in relations matched by table and relation patterns. Author: Mark Dilger <mark.dilger@enterprisedb.com> Discussion: https://www.postgresql.org/message-id/flat/81ad4757-92c1-4aa3-7bee-f609544837e3%40enterprisedb.com
This commit is contained in:
@ -1910,14 +1910,14 @@ compile_relation_list_one_db(PGconn *conn, SimplePtrList *relations,
|
||||
if (opts.allrel)
|
||||
appendPQExpBuffer(&sql,
|
||||
" AND c.relam = %u "
|
||||
"AND c.relkind IN ('r', 'm', 't') "
|
||||
"AND c.relkind IN ('r', 'S', 'm', 't') "
|
||||
"AND c.relnamespace != %u",
|
||||
HEAP_TABLE_AM_OID, PG_TOAST_NAMESPACE);
|
||||
else
|
||||
appendPQExpBuffer(&sql,
|
||||
" AND c.relam IN (%u, %u)"
|
||||
"AND c.relkind IN ('r', 'm', 't', 'i') "
|
||||
"AND ((c.relam = %u AND c.relkind IN ('r', 'm', 't')) OR "
|
||||
"AND c.relkind IN ('r', 'S', 'm', 't', 'i') "
|
||||
"AND ((c.relam = %u AND c.relkind IN ('r', 'S', 'm', 't')) OR "
|
||||
"(c.relam = %u AND c.relkind = 'i'))",
|
||||
HEAP_TABLE_AM_OID, BTREE_AM_OID,
|
||||
HEAP_TABLE_AM_OID, BTREE_AM_OID);
|
||||
|
Reference in New Issue
Block a user