mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Some RELKIND macro refactoring
Add more macros to group some RELKIND_* macros: - RELKIND_HAS_PARTITIONS() - RELKIND_HAS_TABLESPACE() - RELKIND_HAS_TABLE_AM() Reviewed-by: Michael Paquier <michael@paquier.xyz> Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://www.postgresql.org/message-id/flat/a574c8f1-9c84-93ad-a9e5-65233d6fc00f%40enterprisedb.com
This commit is contained in:
@ -306,9 +306,7 @@ verify_heapam(PG_FUNCTION_ARGS)
|
||||
/*
|
||||
* Check that a relation's relkind and access method are both supported.
|
||||
*/
|
||||
if (ctx.rel->rd_rel->relkind != RELKIND_RELATION &&
|
||||
ctx.rel->rd_rel->relkind != RELKIND_MATVIEW &&
|
||||
ctx.rel->rd_rel->relkind != RELKIND_TOASTVALUE &&
|
||||
if (!RELKIND_HAS_TABLE_AM(ctx.rel->rd_rel->relkind) &&
|
||||
ctx.rel->rd_rel->relkind != RELKIND_SEQUENCE)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
|
||||
|
Reference in New Issue
Block a user