diff --git a/src/bin/pg_dump/dumputils.c b/src/bin/pg_dump/dumputils.c
index 8f70259415787b321498dea09465d146ed6f4486..9b30629515083f2af2b25a088d00aa448ab5711a 100644
--- a/src/bin/pg_dump/dumputils.c
+++ b/src/bin/pg_dump/dumputils.c
@@ -22,6 +22,10 @@
 #include "parser/keywords.h"
 
 
+/* Globals from keywords.c */
+extern const ScanKeyword FEScanKeywords[];
+extern const int NumFEScanKeywords;
+
 /* Globals exported by this file */
 int			quote_all_identifiers = 0;
 const char *progname = NULL;
@@ -150,8 +154,8 @@ fmtId(const char *rawid)
 		 * that's fine, since we already know we have all-lower-case.
 		 */
 		const ScanKeyword *keyword = ScanKeywordLookup(rawid,
-													   ScanKeywords,
-													   NumScanKeywords);
+													   FEScanKeywords,
+													   NumFEScanKeywords);
 
 		if (keyword != NULL && keyword->category != UNRESERVED_KEYWORD)
 			need_quotes = true;
diff --git a/src/bin/pg_dump/keywords.c b/src/bin/pg_dump/keywords.c
index 7294a55f80fe52a997d029a6798c57e97a49af6b..44e4c55c6979db7b79e53591c95ece030f9fc1b8 100644
--- a/src/bin/pg_dump/keywords.c
+++ b/src/bin/pg_dump/keywords.c
@@ -23,8 +23,8 @@
  */
 #define PG_KEYWORD(a,b,c) {a,0,c},
 
-const ScanKeyword ScanKeywords[] = {
+const ScanKeyword FEScanKeywords[] = {
 #include "parser/kwlist.h"
 };
 
-const int	NumScanKeywords = lengthof(ScanKeywords);
+const int	NumFEScanKeywords = lengthof(FEScanKeywords);
diff --git a/src/interfaces/ecpg/preproc/ecpg_keywords.c b/src/interfaces/ecpg/preproc/ecpg_keywords.c
index 8032c30c405e619d9374d6c269455d387aca7f90..fb54d7b5c6d75c1165e7a2d8010390c042e89643 100644
--- a/src/interfaces/ecpg/preproc/ecpg_keywords.c
+++ b/src/interfaces/ecpg/preproc/ecpg_keywords.c
@@ -16,13 +16,17 @@
 #include "extern.h"
 #include "preproc.h"
 
+/* Globals from keywords.c */
+extern const ScanKeyword SQLScanKeywords[];
+extern const int NumSQLScanKeywords;
+
 /*
  * List of (keyword-name, keyword-token-value) pairs.
  *
  * !!WARNING!!: This list must be sorted, because binary
  *		 search is used to locate entries.
  */
-static const ScanKeyword ScanECPGKeywords[] = {
+static const ScanKeyword ECPGScanKeywords[] = {
 	/* name, value, category */
 
 	/*
@@ -87,12 +91,12 @@ ScanECPGKeywordLookup(const char *text)
 	const ScanKeyword *res;
 
 	/* First check SQL symbols defined by the backend. */
-	res = ScanKeywordLookup(text, ScanKeywords, NumScanKeywords);
+	res = ScanKeywordLookup(text, SQLScanKeywords, NumSQLScanKeywords);
 	if (res)
 		return res;
 
 	/* Try ECPG-specific keywords. */
-	res = ScanKeywordLookup(text, ScanECPGKeywords, lengthof(ScanECPGKeywords));
+	res = ScanKeywordLookup(text, ECPGScanKeywords, lengthof(ECPGScanKeywords));
 	if (res)
 		return res;
 
diff --git a/src/interfaces/ecpg/preproc/keywords.c b/src/interfaces/ecpg/preproc/keywords.c
index b6dcfe277468c0d60d5dbdf2faeb9fe85cfb540e..71f60c5062e27afcf1f4e47bf50b8c187ee9175c 100644
--- a/src/interfaces/ecpg/preproc/keywords.c
+++ b/src/interfaces/ecpg/preproc/keywords.c
@@ -22,8 +22,8 @@
 #define PG_KEYWORD(a,b,c) {a,b,c},
 
 
-const ScanKeyword ScanKeywords[] = {
+const ScanKeyword SQLScanKeywords[] = {
 #include "parser/kwlist.h"
 };
 
-const int	NumScanKeywords = lengthof(ScanKeywords);
+const int	NumSQLScanKeywords = lengthof(SQLScanKeywords);