From: Justin Pryzby Date: Wed, 24 Feb 2021 02:23:17 -0600 Subject: [PATCH] language fixen --- contrib/postgres_fdw/postgres_fdw.c | 4 ++-- doc/src/sgml/fdwhandler.sgml | 13 +++++++------ src/backend/commands/copyfrom.c | 2 +- src/backend/commands/copyto.c | 4 ++-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index b55f19b193..a3c394360e 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -2203,7 +2203,7 @@ pgfdw_copy_dest_cb(void *buf, int len) /* * postgresBeginForeignCopy - * Begin an COPY operation on a foreign table + * Begin a COPY operation on a foreign table */ static void postgresBeginForeignCopy(EState *estate, @@ -2306,7 +2306,7 @@ postgresExecForeignCopy(ResultRelInfo *resultRelInfo, /* * postgresEndForeignCopy - * Finish an COPY operation on a foreign table + * Finish a COPY operation on a foreign table */ static void postgresEndForeignCopy(EState *estate, ResultRelInfo *resultRelInfo) diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml index a49c17251f..666148aeb3 100644 --- a/doc/src/sgml/fdwhandler.sgml +++ b/doc/src/sgml/fdwhandler.sgml @@ -813,8 +813,9 @@ BeginForeignInsert(ModifyTableState *mtstate, Begin executing an insert operation on a foreign table. This routine is called right before the first tuple is inserted into the foreign table - in both cases when it is the partition chosen for tuple routing and the - target specified in a COPY FROM command. It should + target specified in a COPY FROM command, or when + the foreign table is the partition chosen for tuple routing of a + partitioned table. It should perform any initialization needed prior to the actual insertion. Subsequently, ExecForeignInsert or ExecForeignBatchInsert will be called for @@ -1072,12 +1073,12 @@ BeginForeignCopy(EState *estate, ResultRelInfo *rinfo); - Begin executing an copy operation on a foreign table. This routine is + Begin executing a copy operation on a foreign table. This routine is called right before the first call of ExecForeignCopy routine for the foreign table. It should perform any initialization needed prior to the actual COPY FROM operation. Subsequently, ExecForeignCopy will be called for - a bulk of tuples to be copied into the foreign table. + a batch of tuples to be copied into the foreign table. @@ -1101,12 +1102,12 @@ ExecForeignCopy(ResultRelInfo *rinfo, int nslots); - Copy a bulk of tuples into the foreign table. + Copy a batch of tuples into the foreign table. rinfo is the ResultRelInfo struct describing the target foreign table. slots contains the tuples to be inserted; it will match the row-type definition of the foreign table. - nslots is a number of tuples in the slots + nslots is the number of tuples in the slots diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index 7b05da7871..b7c912cc3f 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -660,7 +660,7 @@ CopyFrom(CopyFromState cstate) resultRelInfo = target_resultRelInfo = makeNode(ResultRelInfo); ExecInitResultRelation(estate, resultRelInfo, 1); - Assert(target_resultRelInfo->ri_usesMultiInsert == false); + Assert(!target_resultRelInfo->ri_usesMultiInsert); /* * It's generally more efficient to prepare a bunch of tuples for diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 03c9df5084..2ac1e27acd 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -859,8 +859,8 @@ EndCopyTo(CopyToState cstate) /* * Start COPY TO operation. - * Separated to the routine to prevent duplicate operations in the case of - * manual mode, where tuples are copied to the destination one by one, by call of + * Separate from the main routine to prevent duplicate operations in + * manual mode, where tuples are copied to the destination one by one, by calling * the CopyOneRowTo() routine. */ void -- 2.17.0 --TB36FDmn/VVEgNH/--