mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
Rename macro to RELKIND_HAS_STORAGE
The original name was an unfortunate choice. Discussion: https://postgr.es/m/20181218.145600.172055615.horiguchi.kyotaro@lab.ntt.co.jp
This commit is contained in:
@ -2405,7 +2405,7 @@ CopyFrom(CopyState cstate)
|
|||||||
*----------
|
*----------
|
||||||
*/
|
*/
|
||||||
/* createSubid is creation check, newRelfilenodeSubid is truncation check */
|
/* createSubid is creation check, newRelfilenodeSubid is truncation check */
|
||||||
if (RELKIND_CAN_HAVE_STORAGE(cstate->rel->rd_rel->relkind) &&
|
if (RELKIND_HAS_STORAGE(cstate->rel->rd_rel->relkind) &&
|
||||||
(cstate->rel->rd_createSubid != InvalidSubTransactionId ||
|
(cstate->rel->rd_createSubid != InvalidSubTransactionId ||
|
||||||
cstate->rel->rd_newRelfilenodeSubid != InvalidSubTransactionId))
|
cstate->rel->rd_newRelfilenodeSubid != InvalidSubTransactionId))
|
||||||
{
|
{
|
||||||
|
@ -11003,7 +11003,7 @@ ATExecSetTableSpaceNoStorage(Relation rel, Oid newTableSpace)
|
|||||||
* Shouldn't be called on relations having storage; these are processed
|
* Shouldn't be called on relations having storage; these are processed
|
||||||
* in phase 3.
|
* in phase 3.
|
||||||
*/
|
*/
|
||||||
Assert(!RELKIND_CAN_HAVE_STORAGE(rel->rd_rel->relkind));
|
Assert(!RELKIND_HAS_STORAGE(rel->rd_rel->relkind));
|
||||||
|
|
||||||
/* Can't allow a non-shared relation in pg_global */
|
/* Can't allow a non-shared relation in pg_global */
|
||||||
if (newTableSpace == GLOBALTABLESPACE_OID)
|
if (newTableSpace == GLOBALTABLESPACE_OID)
|
||||||
|
@ -127,7 +127,7 @@ typedef FormData_pg_class *Form_pg_class;
|
|||||||
* relfilenode set to non-zero, but it can also be zero if the relation is
|
* relfilenode set to non-zero, but it can also be zero if the relation is
|
||||||
* mapped.
|
* mapped.
|
||||||
*/
|
*/
|
||||||
#define RELKIND_CAN_HAVE_STORAGE(relkind) \
|
#define RELKIND_HAS_STORAGE(relkind) \
|
||||||
((relkind) == RELKIND_RELATION || \
|
((relkind) == RELKIND_RELATION || \
|
||||||
(relkind) == RELKIND_INDEX || \
|
(relkind) == RELKIND_INDEX || \
|
||||||
(relkind) == RELKIND_SEQUENCE || \
|
(relkind) == RELKIND_SEQUENCE || \
|
||||||
|
Reference in New Issue
Block a user