Incorrect comment in contrib/postgres_fdw/deparse.c
Hi,
I found an incorrect comment in contrib/postgres_fdw/deparse.c: s/FOR
SELECT or FOR SHARE/FOR UPDATE or FOR SHARE/ Attached is a patch to fix
that comment.
Best regards,
Etsuro Fujita
Attachments:
pgfdw-comment.patchtext/x-patch; name=pgfdw-comment.patchDownload
diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c
index bdc410d..d78ac79 100644
--- a/contrib/postgres_fdw/deparse.c
+++ b/contrib/postgres_fdw/deparse.c
@@ -937,7 +937,7 @@ deparseTargetList(StringInfo buf,
}
/*
- * Deparse the appropriate locking clause (FOR SELECT or FOR SHARE) for a
+ * Deparse the appropriate locking clause (FOR UPDATE or FOR SHARE) for a
* given relation (context->foreignrel).
*/
static void
On 2016/04/04 20:11, Etsuro Fujita wrote:
I found an incorrect comment in contrib/postgres_fdw/deparse.c: s/FOR
SELECT or FOR SHARE/FOR UPDATE or FOR SHARE/ Attached is a patch to fix
that comment.
Other than this, I ran into some typos in contrib/postgres_fdw, while
working on join pushdown improvements. Please find attached an updated
version of the patch.
Best regards,
Etsuro Fujita
Attachments:
comment-typos-in-contrib-postgres-fdw.patchbinary/octet-stream; name=comment-typos-in-contrib-postgres-fdw.patchDownload
diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c
index 6476005..aaf9108 100644
--- a/contrib/postgres_fdw/deparse.c
+++ b/contrib/postgres_fdw/deparse.c
@@ -939,7 +939,7 @@ deparseTargetList(StringInfo buf,
}
/*
- * Deparse the appropriate locking clause (FOR SELECT or FOR SHARE) for a
+ * Deparse the appropriate locking clause (FOR UPDATE or FOR SHARE) for a
* given relation (context->foreignrel).
*/
static void
@@ -1163,7 +1163,7 @@ deparseFromExprForRel(StringInfo buf, PlannerInfo *root, RelOptInfo *foreignrel,
/*
* For a join relation FROM clause entry is deparsed as
*
- * ((outer relation) <join type> (inner relation) ON (joinclauses)
+ * ((outer relation) <join type> (inner relation) ON (joinclauses))
*/
appendStringInfo(buf, "(%s %s JOIN %s ON ", join_sql_o.data,
get_jointype_name(fpinfo->jointype), join_sql_i.data);
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index 931bcfd..bfd81c4 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -484,7 +484,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
fpinfo = (PgFdwRelationInfo *) palloc0(sizeof(PgFdwRelationInfo));
baserel->fdw_private = (void *) fpinfo;
- /* Base foreign tables need to be push down always. */
+ /* Base foreign tables need to be pushed down always. */
fpinfo->pushdown_safe = true;
/* Look up foreign-table catalog info. */
@@ -2637,7 +2637,9 @@ estimate_path_cost_size(PlannerInfo *root,
* rows.
*/
- /* Calculate the cost of clauses pushed down the foreign server */
+ /*
+ * Calculate the cost of clauses pushed down to the foreign server
+ */
cost_qual_eval(&remote_conds_cost, fpinfo->remote_conds, root);
/* Calculate the cost of applying join clauses */
cost_qual_eval(&join_cost, fpinfo->joinclauses, root);
On Wed, Aug 24, 2016 at 2:41 AM, Etsuro Fujita
<fujita.etsuro@lab.ntt.co.jp> wrote:
On 2016/04/04 20:11, Etsuro Fujita wrote:
I found an incorrect comment in contrib/postgres_fdw/deparse.c: s/FOR
SELECT or FOR SHARE/FOR UPDATE or FOR SHARE/ Attached is a patch to fix
that comment.Other than this, I ran into some typos in contrib/postgres_fdw, while
working on join pushdown improvements. Please find attached an updated
version of the patch.
Thanks, committed.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 2016/08/25 5:29, Robert Haas wrote:
On Wed, Aug 24, 2016 at 2:41 AM, Etsuro Fujita
<fujita.etsuro@lab.ntt.co.jp> wrote:On 2016/04/04 20:11, Etsuro Fujita wrote:
I found an incorrect comment in contrib/postgres_fdw/deparse.c: s/FOR
SELECT or FOR SHARE/FOR UPDATE or FOR SHARE/ Attached is a patch to fix
that comment.
Other than this, I ran into some typos in contrib/postgres_fdw, while
working on join pushdown improvements. Please find attached an updated
version of the patch.
Thanks, committed.
Thanks for picking this up!
Best regards,
Etsuro Fujita
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers