Misnaming of staext_dependencies_load

Started by Kyotaro HORIGUCHIover 8 years ago2 messages
#1Kyotaro HORIGUCHI
horiguchi.kyotaro@lab.ntt.co.jp
1 attachment(s)

Hello.

It is annoying that only staext_dependencies_load is prefixed
with "staext" (two t's) among several similar names prefixed by
"statext"(three t's).

Should we rename it to have the same prefix?

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachments:

rename_staext_to_statext.patchtext/x-patch; charset=us-asciiDownload
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index 793b2da..ba3b1d0 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -633,11 +633,11 @@ dependency_implies_attribute(MVDependency *dependency, AttrNumber attnum)
 }
 
 /*
- * staext_dependencies_load
+ * statext_dependencies_load
  *		Load the functional dependencies for the indicated pg_statistic_ext tuple
  */
 MVDependencies *
-staext_dependencies_load(Oid mvoid)
+statext_dependencies_load(Oid mvoid)
 {
 	bool		isnull;
 	Datum		deps;
@@ -987,7 +987,7 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
 	}
 
 	/* load the dependency items stored in the statistics object */
-	dependencies = staext_dependencies_load(stat->statOid);
+	dependencies = statext_dependencies_load(stat->statOid);
 
 	/*
 	 * Apply the dependencies recursively, starting with the widest/strongest
diff --git a/src/include/statistics/statistics.h b/src/include/statistics/statistics.h
index a3f0d90..58e1a62 100644
--- a/src/include/statistics/statistics.h
+++ b/src/include/statistics/statistics.h
@@ -78,7 +78,7 @@ typedef struct MVDependencies
 #define SizeOfDependencies	(offsetof(MVDependencies, ndeps) + sizeof(uint32))
 
 extern MVNDistinct *statext_ndistinct_load(Oid mvoid);
-extern MVDependencies *staext_dependencies_load(Oid mvoid);
+extern MVDependencies *statext_dependencies_load(Oid mvoid);
 
 extern void BuildRelationExtStatistics(Relation onerel, double totalrows,
 						   int numrows, HeapTuple *rows,
#2Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Kyotaro HORIGUCHI (#1)
Re: Misnaming of staext_dependencies_load

Kyotaro HORIGUCHI wrote:

Hello.

It is annoying that only staext_dependencies_load is prefixed
with "staext" (two t's) among several similar names prefixed by
"statext"(three t's).

Should we rename it to have the same prefix?

Sure. Pushed, thanks.

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers