Minor code improvement to estimate_path_cost_size in postgres_fdw

Started by Tatsuro Yamadaabout 8 years ago3 messages
#1Tatsuro Yamada
yamada.tatsuro@lab.ntt.co.jp
1 attachment(s)

Hi,

The declaration of estimate_path_cost_size uses baserel, but
the actual definition uses foreignrel. It would be better to sync.

Please find attached a patch.

Tatsuro Yamada
NTT Open Source Software Center

Attachments:

fix_declaration_of_estimate_path_cost_size.patchtext/x-patch; name=fix_declaration_of_estimate_path_cost_size.patchDownload
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index 7992ba5..f7da056 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -353,7 +353,7 @@ static void postgresGetForeignUpperPaths(PlannerInfo *root,
  * Helper functions
  */
 static void estimate_path_cost_size(PlannerInfo *root,
-						RelOptInfo *baserel,
+						RelOptInfo *foreignrel,
 						List *join_conds,
 						List *pathkeys,
 						double *p_rows, int *p_width,
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Tatsuro Yamada (#1)
Re: Minor code improvement to estimate_path_cost_size in postgres_fdw

Tatsuro Yamada <yamada.tatsuro@lab.ntt.co.jp> writes:

The declaration of estimate_path_cost_size uses baserel, but
the actual definition uses foreignrel. It would be better to sync.

Yeah, the join_conds parameter's been renamed at some point too :-(
Fixed.

regards, tom lane

#3Tatsuro Yamada
yamada.tatsuro@lab.ntt.co.jp
In reply to: Tom Lane (#2)
Re: Minor code improvement to estimate_path_cost_size in postgres_fdw

On 2018/01/12 1:54, Tom Lane wrote:

Tatsuro Yamada <yamada.tatsuro@lab.ntt.co.jp> writes:

The declaration of estimate_path_cost_size uses baserel, but
the actual definition uses foreignrel. It would be better to sync.

Yeah, the join_conds parameter's been renamed at some point too :-(
Fixed.

regards, tom lane

Thanks! :)

Regards,
Tatsuro Yamada