diff options
Diffstat (limited to 'src/backend/commands/copy.c')
-rw-r--r-- | src/backend/commands/copy.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 226d2ef3dac..a5528f8307f 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -2408,10 +2408,15 @@ CopyFrom(CopyState cstate) * possible to improve on this, but it does mean maintaining heap insert * option flags per partition and setting them when we first open the * partition. + * + * This optimization is not supported for relation types which do not + * have any physical storage, with views entering in this category. + * Partitioned tables are not supported as per the description above. *---------- */ /* createSubid is creation check, newRelfilenodeSubid is truncation check */ if (cstate->rel->rd_rel->relkind != RELKIND_PARTITIONED_TABLE && + cstate->rel->rd_rel->relkind != RELKIND_VIEW && (cstate->rel->rd_createSubid != InvalidSubTransactionId || cstate->rel->rd_newRelfilenodeSubid != InvalidSubTransactionId)) { |