agora inbox for [email protected]
help / color / mirror / Atom feedFrom: Justin Pryzby <[email protected]>
Subject: [PATCH] language fixen
Date: Wed, 24 Feb 2021 02:23:17 -0600
---
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 <command>COPY FROM</command> command. It should
+ target specified in a <command>COPY FROM</command> 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, <function>ExecForeignInsert</function> or
<function>ExecForeignBatchInsert</function> will be called for
@@ -1072,12 +1073,12 @@ BeginForeignCopy(EState *estate,
ResultRelInfo *rinfo);
</programlisting>
- 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 <function>ExecForeignCopy</function>
routine for the foreign table. It should perform any initialization needed
prior to the actual COPY FROM operation.
Subsequently, <function>ExecForeignCopy</function> 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.
</para>
<para>
@@ -1101,12 +1102,12 @@ ExecForeignCopy(ResultRelInfo *rinfo,
int nslots);
</programlisting>
- Copy a bulk of tuples into the foreign table.
+ Copy a batch of tuples into the foreign table.
<literal>rinfo</literal> is the <structname>ResultRelInfo</structname> struct describing
the target foreign table.
<literal>slots</literal> contains the tuples to be inserted; it will match the
row-type definition of the foreign table.
- <literal>nslots</literal> is a number of tuples in the <literal>slots</literal>
+ <literal>nslots</literal> is the number of tuples in the <literal>slots</literal>
</para>
<para>
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/--
view thread (26+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [PATCH] language fixen
In-Reply-To: <no-message-id-1869670@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox