From cc26ea9fe2e41e73c955ea75bea7a77fbd062d64 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter_e@gmx.net>
Date: Sat, 20 Apr 2013 11:04:41 -0400
Subject: [PATCH] Clean up references to SQL92

In most cases, these were just references to the SQL standard in
general.  In a few cases, a contrast was made between SQL92 and later
standards -- those have been kept unchanged.
---
 src/backend/catalog/pg_operator.c          |  6 ++---
 src/backend/executor/execMain.c            |  2 +-
 src/backend/parser/gram.y                  | 28 ++++++++++------------
 src/backend/parser/parse_relation.c        |  6 ++---
 src/backend/parser/parse_utilcmd.c         |  6 ++---
 src/backend/tcop/pquery.c                  |  2 +-
 src/backend/utils/adt/date.c               | 10 ++++----
 src/backend/utils/adt/datetime.c           |  4 ++--
 src/backend/utils/adt/float.c              |  2 +-
 src/backend/utils/adt/like_match.c         |  2 +-
 src/backend/utils/adt/numeric.c            |  6 ++---
 src/backend/utils/adt/timestamp.c          |  8 +++----
 src/backend/utils/adt/varlena.c            | 12 +++++-----
 src/include/nodes/parsenodes.h             |  2 +-
 src/include/utils/date.h                   |  2 +-
 src/include/utils/timestamp.h              |  2 +-
 src/interfaces/ecpg/preproc/pgc.l          |  4 ++--
 src/test/regress/expected/boolean.out      |  2 +-
 src/test/regress/expected/case.out         |  2 +-
 src/test/regress/expected/strings.out      |  8 +++----
 src/test/regress/input/constraints.source  |  2 +-
 src/test/regress/output/constraints.source |  2 +-
 src/test/regress/sql/boolean.sql           |  2 +-
 src/test/regress/sql/case.sql              |  2 +-
 src/test/regress/sql/strings.sql           |  8 +++----
 25 files changed, 65 insertions(+), 67 deletions(-)

diff --git a/src/backend/catalog/pg_operator.c b/src/backend/catalog/pg_operator.c
index f8d6bb0e34b..802b9840e86 100644
--- a/src/backend/catalog/pg_operator.c
+++ b/src/backend/catalog/pg_operator.c
@@ -92,10 +92,10 @@ validOperatorName(const char *name)
 		return false;
 
 	/*
-	 * For SQL92 compatibility, '+' and '-' cannot be the last char of a
+	 * For SQL standard compatibility, '+' and '-' cannot be the last char of a
 	 * multi-char operator unless the operator contains chars that are not in
-	 * SQL92 operators. The idea is to lex '=-' as two operators, but not to
-	 * forbid operator names like '?-' that could not be sequences of SQL92
+	 * SQL operators. The idea is to lex '=-' as two operators, but not to
+	 * forbid operator names like '?-' that could not be sequences of standard SQL
 	 * operators.
 	 */
 	if (len > 1 &&
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 2a72e3c9e6c..8d1d0aa927d 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -1618,7 +1618,7 @@ ExecRelCheck(ResultRelInfo *resultRelInfo,
 		qual = resultRelInfo->ri_ConstraintExprs[i];
 
 		/*
-		 * NOTE: SQL92 specifies that a NULL result from a constraint
+		 * NOTE: SQL specifies that a NULL result from a constraint
 		 * expression is not to be treated as a failure.  Therefore, tell
 		 * ExecQual to return TRUE for NULL.
 		 */
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index ec693734f51..73c446a9071 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -21,8 +21,6 @@
  * NOTES
  *	  CAPITALS are used to represent terminal symbols.
  *	  non-capitals are used to represent non-terminals.
- *	  SQL92-specific syntax is separated from plain SQL/Postgres syntax
- *	  to help isolate the non-extensible portions of the parser.
  *
  *	  In general, nothing in this file should initiate database accesses
  *	  nor depend on changeable state (such as SET variables).  If you do
@@ -1281,7 +1279,7 @@ schema_stmt:
  *
  * Set PG internal variable
  *	  SET name TO 'var_value'
- * Include SQL92 syntax (thomas 1997-10-22):
+ * Include SQL syntax (thomas 1997-10-22):
  *	  SET TIME ZONE 'var_value'
  *
  *****************************************************************************/
@@ -2780,7 +2778,7 @@ ColConstraint:
  * to make it explicit.
  * - thomas 1998-09-13
  *
- * WITH NULL and NULL are not SQL92-standard syntax elements,
+ * WITH NULL and NULL are not SQL-standard syntax elements,
  * so leave them out. Use DEFAULT NULL to explicitly indicate
  * that a column may have that value. WITH NULL leads to
  * shift/reduce conflicts with WITH TIME ZONE anyway.
@@ -9159,7 +9157,7 @@ select_clause:
  * As with select_no_parens, simple_select cannot have outer parentheses,
  * but can have parenthesized subclauses.
  *
- * Note that sort clauses cannot be included at this level --- SQL92 requires
+ * Note that sort clauses cannot be included at this level --- SQL requires
  *		SELECT foo UNION SELECT bar ORDER BY baz
  * to be parsed as
  *		(SELECT foo UNION SELECT bar) ORDER BY baz
@@ -9660,7 +9658,7 @@ table_ref:	relation_expr opt_alias_clause
 
 /*
  * It may seem silly to separate joined_table from table_ref, but there is
- * method in SQL92's madness: if you don't do it this way you get reduce-
+ * method in SQL's madness: if you don't do it this way you get reduce-
  * reduce conflicts, because it's not clear to the parser generator whether
  * to expect alias_clause after ')' or not.  For the same reason we must
  * treat 'JOIN' and 'join_type JOIN' separately, rather than allowing
@@ -9959,7 +9957,7 @@ TableFuncElement:	ColId Typename opt_collate_clause
 /*****************************************************************************
  *
  *	Type syntax
- *		SQL92 introduces a large amount of type-specific syntax.
+ *		SQL introduces a large amount of type-specific syntax.
  *		Define individual clauses to handle these cases, and use
  *		 the generic case to handle regular type-extensible Postgres syntax.
  *		- thomas 1997-10-10
@@ -10085,7 +10083,7 @@ opt_type_modifiers: '(' expr_list ')'				{ $$ = $2; }
 		;
 
 /*
- * SQL92 numeric data types
+ * SQL numeric data types
  */
 Numeric:	INT_P
 				{
@@ -10175,7 +10173,7 @@ opt_float:	'(' Iconst ')'
 		;
 
 /*
- * SQL92 bit-field data types
+ * SQL bit-field data types
  * The following implements BIT() and BIT VARYING().
  */
 Bit:		BitWithLength
@@ -10232,7 +10230,7 @@ BitWithoutLength:
 
 
 /*
- * SQL92 character data types
+ * SQL character data types
  * The following implements CHAR() and VARCHAR().
  */
 Character:  CharacterWithLength
@@ -10329,7 +10327,7 @@ opt_charset:
 		;
 
 /*
- * SQL92 date/time types
+ * SQL date/time types
  */
 ConstDatetime:
 			TIMESTAMP '(' Iconst ')' opt_timezone
@@ -10661,7 +10659,7 @@ a_expr:		c_expr									{ $$ = $1; }
 				}
 
 			/* NullTest clause
-			 * Define SQL92-style Null test clause.
+			 * Define SQL-style Null test clause.
 			 * Allow two forms described in the standard:
 			 *	a IS NULL
 			 *	a IS NOT NULL
@@ -11189,7 +11187,7 @@ func_expr:	func_name '(' ')' over_clause
 					/*
 					 * We consider AGGREGATE(*) to invoke a parameterless
 					 * aggregate.  This does the right thing for COUNT(*),
-					 * and there are no other aggregates in SQL92 that accept
+					 * and there are no other aggregates in SQL that accept
 					 * '*' as parameter.
 					 *
 					 * The FuncCall node is also marked agg_star = true,
@@ -11505,7 +11503,7 @@ func_expr:	func_name '(' ')' over_clause
 				}
 			| TRIM '(' BOTH trim_list ')'
 				{
-					/* various trim expressions are defined in SQL92
+					/* various trim expressions are defined in SQL
 					 * - thomas 1997-07-19
 					 */
 					FuncCall *n = makeNode(FuncCall);
@@ -12208,7 +12206,7 @@ in_expr:	select_with_parens
 		;
 
 /*
- * Define SQL92-style case clause.
+ * Define SQL-style CASE clause.
  * - Full specification
  *	CASE WHEN a = b THEN c ... ELSE d END
  * - Implicit argument
diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c
index 82e088a38ba..a01589a1d9c 100644
--- a/src/backend/parser/parse_relation.c
+++ b/src/backend/parser/parse_relation.c
@@ -70,7 +70,7 @@ static bool isQueryUsingTempRelation_walker(Node *node, void *context);
  * that (a) has no alias and (b) is for the same relation identified by
  * schemaname.refname.	In this case we convert schemaname.refname to a
  * relation OID and search by relid, rather than by alias name.  This is
- * peculiar, but it's what SQL92 says to do.
+ * peculiar, but it's what SQL says to do.
  */
 RangeTblEntry *
 refnameRangeTblEntry(ParseState *pstate,
@@ -353,7 +353,7 @@ searchRangeTableForRel(ParseState *pstate, RangeVar *relation)
  * Note: we assume that each given argument does not contain conflicts
  * itself; we just want to know if the two can be merged together.
  *
- * Per SQL92, two alias-less plain relation RTEs do not conflict even if
+ * Per SQL, two alias-less plain relation RTEs do not conflict even if
  * they have the same eref->aliasname (ie, same relation name), if they
  * are for different relation OIDs (implying they are in different schemas).
  *
@@ -389,7 +389,7 @@ checkNameSpaceConflicts(ParseState *pstate, List *namespace1,
 			if (rte1->rtekind == RTE_RELATION && rte1->alias == NULL &&
 				rte2->rtekind == RTE_RELATION && rte2->alias == NULL &&
 				rte1->relid != rte2->relid)
-				continue;		/* no conflict per SQL92 rule */
+				continue;		/* no conflict per SQL rule */
 			ereport(ERROR,
 					(errcode(ERRCODE_DUPLICATE_ALIAS),
 					 errmsg("table name \"%s\" specified more than once",
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index 46dc6724f47..9ad832bbb28 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -133,7 +133,7 @@ static void setSchemaName(char *context_schema, char **stmt_schema_name);
  * will be the transformed CreateStmt, but there may be additional actions
  * to be done before and after the actual DefineRelation() call.
  *
- * SQL92 allows constraints to be scattered all over, so thumb through
+ * SQL allows constraints to be scattered all over, so thumb through
  * the columns and collect all constraints into one place.
  * If there are any implied indices (e.g. UNIQUE or PRIMARY KEY)
  * then expand those into multiple IndexStmt blocks.
@@ -1405,7 +1405,7 @@ transformIndexConstraints(CreateStmtContext *cxt)
 	/*
 	 * Scan the index list and remove any redundant index specifications. This
 	 * can happen if, for instance, the user writes UNIQUE PRIMARY KEY. A
-	 * strict reading of SQL92 would suggest raising an error instead, but
+	 * strict reading of SQL would suggest raising an error instead, but
 	 * that strikes me as too anal-retentive. - tgl 2001-02-14
 	 *
 	 * XXX in ALTER TABLE case, it'd be nice to look for duplicate
@@ -2691,7 +2691,7 @@ transformColumnType(CreateStmtContext *cxt, ColumnDef *column)
  * that the logic we use for determining forward references is
  * presently quite incomplete.
  *
- * SQL92 also allows constraints to make forward references, so thumb through
+ * SQL also allows constraints to make forward references, so thumb through
  * the table columns and move forward references to a posterior alter-table
  * command.
  *
diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c
index 5a8ef7e4d9d..107d8aedab4 100644
--- a/src/backend/tcop/pquery.c
+++ b/src/backend/tcop/pquery.c
@@ -1603,7 +1603,7 @@ DoPortalRunFetch(Portal portal,
 	forward = (fdirection == FETCH_FORWARD);
 
 	/*
-	 * Zero count means to re-fetch the current row, if any (per SQL92)
+	 * Zero count means to re-fetch the current row, if any (per SQL)
 	 */
 	if (count == 0)
 	{
diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c
index 57391c30edf..5dd27c4d650 100644
--- a/src/backend/utils/adt/date.c
+++ b/src/backend/utils/adt/date.c
@@ -1,7 +1,7 @@
 /*-------------------------------------------------------------------------
  *
  * date.c
- *	  implements DATE and TIME data types specified in SQL-92 standard
+ *	  implements DATE and TIME data types specified in SQL standard
  *
  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994-5, Regents of the University of California
@@ -1403,9 +1403,9 @@ time_smaller(PG_FUNCTION_ARGS)
 	PG_RETURN_TIMEADT((time1 < time2) ? time1 : time2);
 }
 
-/* overlaps_time() --- implements the SQL92 OVERLAPS operator.
+/* overlaps_time() --- implements the SQL OVERLAPS operator.
  *
- * Algorithm is per SQL92 spec.  This is much harder than you'd think
+ * Algorithm is per SQL spec.  This is much harder than you'd think
  * because the spec requires us to deliver a non-null answer in some cases
  * where some of the inputs are null.
  */
@@ -2273,9 +2273,9 @@ timetz_mi_interval(PG_FUNCTION_ARGS)
 	PG_RETURN_TIMETZADT_P(result);
 }
 
-/* overlaps_timetz() --- implements the SQL92 OVERLAPS operator.
+/* overlaps_timetz() --- implements the SQL OVERLAPS operator.
  *
- * Algorithm is per SQL92 spec.  This is much harder than you'd think
+ * Algorithm is per SQL spec.  This is much harder than you'd think
  * because the spec requires us to deliver a non-null answer in some cases
  * where some of the inputs are null.
  */
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index 9c6030c8d8c..59805047b20 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -1558,8 +1558,8 @@ overflow:
  * Returns 0 if successful, DTERR code if bogus input detected.
  *
  * Note that support for time zone is here for
- * SQL92 TIME WITH TIME ZONE, but it reveals
- * bogosity with SQL92 date/time standards, since
+ * SQL TIME WITH TIME ZONE, but it reveals
+ * bogosity with SQL date/time standards, since
  * we must infer a time zone from current time.
  * - thomas 2000-03-10
  * Allow specifying date to get a better time zone,
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c
index b73e0d50fd5..91df2179a0c 100644
--- a/src/backend/utils/adt/float.c
+++ b/src/backend/utils/adt/float.c
@@ -1922,7 +1922,7 @@ float8_avg(PG_FUNCTION_ARGS)
 	sumX = transvalues[1];
 	/* ignore sumX2 */
 
-	/* SQL92 defines AVG of no values to be NULL */
+	/* SQL defines AVG of no values to be NULL */
 	if (N == 0.0)
 		PG_RETURN_NULL();
 
diff --git a/src/backend/utils/adt/like_match.c b/src/backend/utils/adt/like_match.c
index a31bf8faa38..0c20cd173e5 100644
--- a/src/backend/utils/adt/like_match.c
+++ b/src/backend/utils/adt/like_match.c
@@ -42,7 +42,7 @@
  *
  *	Keith Parks. <keith@mtcc.demon.co.uk>
  *
- *	SQL92 lets you specify the escape character by saying
+ *	SQL lets you specify the escape character by saying
  *	LIKE <pattern> ESCAPE <escape character>. We are a small operation
  *	so we force you to use '\'. - ay 7/95
  *
diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c
index 229b40858df..b343b5fe0f6 100644
--- a/src/backend/utils/adt/numeric.c
+++ b/src/backend/utils/adt/numeric.c
@@ -2645,7 +2645,7 @@ numeric_avg(PG_FUNCTION_ARGS)
 	N = DatumGetNumeric(transdatums[0]);
 	sumX = DatumGetNumeric(transdatums[1]);
 
-	/* SQL92 defines AVG of no values to be NULL */
+	/* SQL defines AVG of no values to be NULL */
 	/* N is zero iff no digits (cf. numeric_uminus) */
 	if (NUMERIC_NDIGITS(N) == 0)
 		PG_RETURN_NULL();
@@ -2824,7 +2824,7 @@ numeric_stddev_pop(PG_FUNCTION_ARGS)
  * purposes.  (The latter two therefore don't really belong in this file,
  * but we keep them here anyway.)
  *
- * Because SQL92 defines the SUM() of no values to be NULL, not zero,
+ * Because SQL defines the SUM() of no values to be NULL, not zero,
  * the initial condition of the transition data value needs to be NULL. This
  * means we can't rely on ExecAgg to automatically insert the first non-null
  * data value into the transition data: it doesn't know how to do the type
@@ -3046,7 +3046,7 @@ int8_avg(PG_FUNCTION_ARGS)
 		elog(ERROR, "expected 2-element int8 array");
 	transdata = (Int8TransTypeData *) ARR_DATA_PTR(transarray);
 
-	/* SQL92 defines AVG of no values to be NULL */
+	/* SQL defines AVG of no values to be NULL */
 	if (transdata->count == 0)
 		PG_RETURN_NULL();
 
diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c
index 1a848f9a33b..60f29533b71 100644
--- a/src/backend/utils/adt/timestamp.c
+++ b/src/backend/utils/adt/timestamp.c
@@ -1,7 +1,7 @@
 /*-------------------------------------------------------------------------
  *
  * timestamp.c
- *	  Functions for the built-in SQL92 types "timestamp" and "interval".
+ *	  Functions for the built-in SQL types "timestamp" and "interval".
  *
  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
@@ -2276,9 +2276,9 @@ interval_hash(PG_FUNCTION_ARGS)
 #endif
 }
 
-/* overlaps_timestamp() --- implements the SQL92 OVERLAPS operator.
+/* overlaps_timestamp() --- implements the SQL OVERLAPS operator.
  *
- * Algorithm is per SQL92 spec.  This is much harder than you'd think
+ * Algorithm is per SQL spec.  This is much harder than you'd think
  * because the spec requires us to deliver a non-null answer in some cases
  * where some of the inputs are null.
  */
@@ -3129,7 +3129,7 @@ interval_avg(PG_FUNCTION_ARGS)
 	memcpy((void *) &sumX, DatumGetPointer(transdatums[0]), sizeof(Interval));
 	memcpy((void *) &N, DatumGetPointer(transdatums[1]), sizeof(Interval));
 
-	/* SQL92 defines AVG of no values to be NULL */
+	/* SQL defines AVG of no values to be NULL */
 	if (N.time == 0)
 		PG_RETURN_NULL();
 
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index f41abe3b2e7..bb85faf1a7b 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -720,18 +720,18 @@ charlen_to_bytelen(const char *p, int n)
  *	- string length
  *
  * If the starting position is zero or less, then return from the start of the string
- *	adjusting the length to be consistent with the "negative start" per SQL92.
+ *	adjusting the length to be consistent with the "negative start" per SQL.
  * If the length is less than zero, return the remaining string.
  *
  * Added multibyte support.
  * - Tatsuo Ishii 1998-4-21
- * Changed behavior if starting position is less than one to conform to SQL92 behavior.
+ * Changed behavior if starting position is less than one to conform to SQL behavior.
  * Formerly returned the entire string; now returns a portion.
  * - Thomas Lockhart 1998-12-10
  * Now uses faster TOAST-slicing interface
  * - John Gray 2002-02-22
  * Remove "#ifdef MULTIBYTE" and test for encoding_max_length instead. Change
- * behaviors conflicting with SQL92 to meet SQL92 (if E = S + L < S throw
+ * behaviors conflicting with SQL to meet SQL (if E = S + L < S throw
  * error; if E < 1, return '', not entire string). Fixed MB related bug when
  * S > LC and < LC + 4 sometimes garbage characters are returned.
  * - Joe Conway 2002-08-10
@@ -1023,7 +1023,7 @@ text_overlay(text *t1, text *t2, int sp, int sl)
 /*
  * textpos -
  *	  Return the position of the specified substring.
- *	  Implements the SQL92 POSITION() function.
+ *	  Implements the SQL POSITION() function.
  *	  Ref: A Guide To The SQL Standard, Date & Darwen, 1997
  * - thomas 1997-07-27
  */
@@ -1903,7 +1903,7 @@ bytea_catenate(bytea *t1, bytea *t2)
  *	- string length (optional)
  *
  * If the starting position is zero or less, then return from the start of the string
- * adjusting the length to be consistent with the "negative start" per SQL92.
+ * adjusting the length to be consistent with the "negative start" per SQL.
  * If the length is less than zero, an ERROR is thrown. If no third argument
  * (length) is provided, the length to the end of the string is assumed.
  */
@@ -2046,7 +2046,7 @@ bytea_overlay(bytea *t1, bytea *t2, int sp, int sl)
 /*
  * byteapos -
  *	  Return the position of the specified substring.
- *	  Implements the SQL92 POSITION() function.
+ *	  Implements the SQL POSITION() function.
  * Cloned from textpos and modified as required.
  */
 Datum
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 2229ef0f95a..6366e66e136 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -1509,7 +1509,7 @@ typedef struct CreateStmt
 
 typedef enum ConstrType			/* types of constraints */
 {
-	CONSTR_NULL,				/* not SQL92, but a lot of people expect it */
+	CONSTR_NULL,				/* not standard SQL, but a lot of people expect it */
 	CONSTR_NOTNULL,
 	CONSTR_DEFAULT,
 	CONSTR_CHECK,
diff --git a/src/include/utils/date.h b/src/include/utils/date.h
index f11fbad48b2..7c3a1bec23d 100644
--- a/src/include/utils/date.h
+++ b/src/include/utils/date.h
@@ -1,7 +1,7 @@
 /*-------------------------------------------------------------------------
  *
  * date.h
- *	  Definitions for the SQL92 "date" and "time" types.
+ *	  Definitions for the SQL "date" and "time" types.
  *
  *
  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h
index 339c2aefed8..e7a53ff53b0 100644
--- a/src/include/utils/timestamp.h
+++ b/src/include/utils/timestamp.h
@@ -1,7 +1,7 @@
 /*-------------------------------------------------------------------------
  *
  * timestamp.h
- *	  Definitions for the SQL92 "timestamp" and "interval" types.
+ *	  Definitions for the SQL "timestamp" and "interval" types.
  *
  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l
index a9d02e97e0e..0cc7ba6c4c9 100644
--- a/src/interfaces/ecpg/preproc/pgc.l
+++ b/src/interfaces/ecpg/preproc/pgc.l
@@ -269,7 +269,7 @@ param			\${integer}
  * In order to make the world safe for Windows and Mac clients as well as
  * Unix ones, we accept either \n or \r as a newline.  A DOS-style \r\n
  * sequence will be seen as two successive newlines, but that doesn't cause
- * any problems.  SQL92-style comments, which start with -- and extend to the
+ * any problems.  SQL-style comments, which start with -- and extend to the
  * next newline, are treated as equivalent to a single whitespace character.
  *
  * NOTE a fine point: if there is no newline following --, we will absorb
@@ -295,7 +295,7 @@ comment			("--"{non_newline}*)
 whitespace		({space}+|{comment})
 
 /*
- * SQL92 requires at least one newline in the whitespace separating
+ * SQL requires at least one newline in the whitespace separating
  * string literals that are to be concatenated.  Silly, but who are we
  * to argue?  Note that {whitespace_with_newline} should not have * after
  * it, whereas {whitespace} should generally have a * after it...
diff --git a/src/test/regress/expected/boolean.out b/src/test/regress/expected/boolean.out
index e39f550332e..463278dca19 100644
--- a/src/test/regress/expected/boolean.out
+++ b/src/test/regress/expected/boolean.out
@@ -366,7 +366,7 @@ SELECT '' AS tf_12_ff_4, BOOLTBL1.*, BOOLTBL2.*
 (16 rows)
 
 --
--- SQL92 syntax
+-- SQL syntax
 -- Try all combinations to ensure that we get nothing when we expect nothing
 -- - thomas 2000-01-04
 --
diff --git a/src/test/regress/expected/case.out b/src/test/regress/expected/case.out
index 9ec32b8bd26..c564eedb948 100644
--- a/src/test/regress/expected/case.out
+++ b/src/test/regress/expected/case.out
@@ -163,7 +163,7 @@ SELECT '' AS "Five",
 --
 -- NULLIF() and COALESCE()
 -- Shorthand forms for typical CASE constructs
---  defined in the SQL92 standard.
+--  defined in the SQL standard.
 --
 SELECT * FROM CASE_TBL WHERE COALESCE(f,i) = 4;
  i | f 
diff --git a/src/test/regress/expected/strings.out b/src/test/regress/expected/strings.out
index 1bd6772ddd4..b87bd8024bc 100644
--- a/src/test/regress/expected/strings.out
+++ b/src/test/regress/expected/strings.out
@@ -2,7 +2,7 @@
 -- STRINGS
 -- Test various data entry syntaxes.
 --
--- SQL92 string continuation syntax
+-- SQL string continuation syntax
 -- E021-03 character string literals
 SELECT 'first line'
 ' - next line'
@@ -272,7 +272,7 @@ SELECT CAST(name 'namefield' AS varchar) AS "varchar(name)";
 (1 row)
 
 --
--- test SQL92 string functions
+-- test SQL string functions
 -- E### and T### are feature reference numbers from SQL99
 --
 -- E021-09 trim function
@@ -1076,7 +1076,7 @@ alter table toasttest alter column f1 set storage external;
 insert into toasttest values(repeat('1234567890',10000));
 insert into toasttest values(repeat('1234567890',10000));
 -- If the starting position is zero or less, then return from the start of the string
--- adjusting the length to be consistent with the "negative start" per SQL92.
+-- adjusting the length to be consistent with the "negative start" per SQL.
 SELECT substr(f1, -1, 5) from toasttest;
  substr 
 --------
@@ -1126,7 +1126,7 @@ alter table toasttest alter column f1 set storage external;
 insert into toasttest values(decode(repeat('1234567890',10000),'escape'));
 insert into toasttest values(decode(repeat('1234567890',10000),'escape'));
 -- If the starting position is zero or less, then return from the start of the string
--- adjusting the length to be consistent with the "negative start" per SQL92.
+-- adjusting the length to be consistent with the "negative start" per SQL.
 SELECT substr(f1, -1, 5) from toasttest;
  substr 
 --------
diff --git a/src/test/regress/input/constraints.source b/src/test/regress/input/constraints.source
index 16468b20afb..2a630378882 100644
--- a/src/test/regress/input/constraints.source
+++ b/src/test/regress/input/constraints.source
@@ -119,7 +119,7 @@ INSERT INTO INSERT_TBL(y) VALUES ('Y');
 
 SELECT 'eight' AS one, currval('insert_seq');
 
--- According to SQL92, it is OK to insert a record that gives rise to NULL
+-- According to SQL, it is OK to insert a record that gives rise to NULL
 -- constraint-condition results.  Postgres used to reject this, but it
 -- was wrong:
 INSERT INTO INSERT_TBL VALUES (null, null, null);
diff --git a/src/test/regress/output/constraints.source b/src/test/regress/output/constraints.source
index ff6c1dc450d..18a5dd8ab19 100644
--- a/src/test/regress/output/constraints.source
+++ b/src/test/regress/output/constraints.source
@@ -188,7 +188,7 @@ SELECT 'eight' AS one, currval('insert_seq');
  eight |       8
 (1 row)
 
--- According to SQL92, it is OK to insert a record that gives rise to NULL
+-- According to SQL, it is OK to insert a record that gives rise to NULL
 -- constraint-condition results.  Postgres used to reject this, but it
 -- was wrong:
 INSERT INTO INSERT_TBL VALUES (null, null, null);
diff --git a/src/test/regress/sql/boolean.sql b/src/test/regress/sql/boolean.sql
index d92a41ffe11..5c46fb92fcf 100644
--- a/src/test/regress/sql/boolean.sql
+++ b/src/test/regress/sql/boolean.sql
@@ -164,7 +164,7 @@ SELECT '' AS tf_12_ff_4, BOOLTBL1.*, BOOLTBL2.*
    ORDER BY BOOLTBL1.f1, BOOLTBL2.f1;
 
 --
--- SQL92 syntax
+-- SQL syntax
 -- Try all combinations to ensure that we get nothing when we expect nothing
 -- - thomas 2000-01-04
 --
diff --git a/src/test/regress/sql/case.sql b/src/test/regress/sql/case.sql
index fd5c4002442..5f41753337d 100644
--- a/src/test/regress/sql/case.sql
+++ b/src/test/regress/sql/case.sql
@@ -110,7 +110,7 @@ SELECT '' AS "Five",
 --
 -- NULLIF() and COALESCE()
 -- Shorthand forms for typical CASE constructs
---  defined in the SQL92 standard.
+--  defined in the SQL standard.
 --
 
 SELECT * FROM CASE_TBL WHERE COALESCE(f,i) = 4;
diff --git a/src/test/regress/sql/strings.sql b/src/test/regress/sql/strings.sql
index 6ef446308b5..89ba46fd999 100644
--- a/src/test/regress/sql/strings.sql
+++ b/src/test/regress/sql/strings.sql
@@ -3,7 +3,7 @@
 -- Test various data entry syntaxes.
 --
 
--- SQL92 string continuation syntax
+-- SQL string continuation syntax
 -- E021-03 character string literals
 SELECT 'first line'
 ' - next line'
@@ -92,7 +92,7 @@ SELECT CAST(f1 AS varchar) AS "varchar(char)" FROM CHAR_TBL;
 SELECT CAST(name 'namefield' AS varchar) AS "varchar(name)";
 
 --
--- test SQL92 string functions
+-- test SQL string functions
 -- E### and T### are feature reference numbers from SQL99
 --
 
@@ -345,7 +345,7 @@ insert into toasttest values(repeat('1234567890',10000));
 insert into toasttest values(repeat('1234567890',10000));
 
 -- If the starting position is zero or less, then return from the start of the string
--- adjusting the length to be consistent with the "negative start" per SQL92.
+-- adjusting the length to be consistent with the "negative start" per SQL.
 SELECT substr(f1, -1, 5) from toasttest;
 
 -- If the length is less than zero, an ERROR is thrown.
@@ -378,7 +378,7 @@ insert into toasttest values(decode(repeat('1234567890',10000),'escape'));
 insert into toasttest values(decode(repeat('1234567890',10000),'escape'));
 
 -- If the starting position is zero or less, then return from the start of the string
--- adjusting the length to be consistent with the "negative start" per SQL92.
+-- adjusting the length to be consistent with the "negative start" per SQL.
 SELECT substr(f1, -1, 5) from toasttest;
 
 -- If the length is less than zero, an ERROR is thrown.
-- 
GitLab