From 04539e73faaaaa1c06c1407671910dceaffdfcd4 Mon Sep 17 00:00:00 2001 From: David Rowley Date: Fri, 11 Jun 2021 13:38:04 +1200 Subject: Use the correct article for abbreviations We've accumulated quite a mix of instances of "an SQL" and "a SQL" in the documents. It would be good to be a bit more consistent with these. The most recent version of the SQL standard I looked at seems to prefer "an SQL". That seems like a good lead to follow, so here we change all instances of "a SQL" to become "an SQL". Most instances correctly use "an SQL" already, so it also makes sense to use the dominant variation in order to minimise churn. Additionally, there were some other abbreviations that needed to be adjusted. FSM, SSPI, SRF and a few others. Also fix some pronounceable, abbreviations to use "a" instead of "an". For example, "a SASL" instead of "an SASL". Here I've only adjusted the documents and error messages. Many others still exist in source code comments. Translator hint comments seem to be the biggest culprit. It currently does not seem worth the churn to change these. Discussion: https://postgr.es/m/CAApHDvpML27UqFXnrYO1MJddsKVMQoiZisPvsAGhKE_tsKXquw%40mail.gmail.com --- src/backend/executor/functions.c | 4 ++-- src/bin/pgbench/pgbench.c | 4 ++-- src/bin/pgbench/t/001_pgbench_with_server.pl | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index 32668f85a1d..e2ea51aafe5 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -511,13 +511,13 @@ init_execution_state(List *queryTree_list, ((CopyStmt *) stmt->utilityStmt)->filename == NULL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot COPY to/from client in a SQL function"))); + errmsg("cannot COPY to/from client in an SQL function"))); if (IsA(stmt->utilityStmt, TransactionStmt)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), /* translator: %s is a SQL statement name */ - errmsg("%s is not allowed in a SQL function", + errmsg("%s is not allowed in an SQL function", CreateCommandName(stmt->utilityStmt)))); } diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index dc84b7b9b78..d7479925cb3 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -5149,7 +5149,7 @@ ParseScript(const char *script, const char *desc, int weight) if (index == 0) syntax_error(desc, lineno, NULL, NULL, - "\\gset must follow a SQL command", + "\\gset must follow an SQL command", NULL, -1); cmd = ps.commands[index - 1]; @@ -5157,7 +5157,7 @@ ParseScript(const char *script, const char *desc, int weight) if (cmd->type != SQL_COMMAND || cmd->varprefix != NULL) syntax_error(desc, lineno, NULL, NULL, - "\\gset must follow a SQL command", + "\\gset must follow an SQL command", cmd->first_line, -1); /* get variable prefix */ diff --git a/src/bin/pgbench/t/001_pgbench_with_server.pl b/src/bin/pgbench/t/001_pgbench_with_server.pl index 9cc5270e02c..55b3c3f6fdd 100644 --- a/src/bin/pgbench/t/001_pgbench_with_server.pl +++ b/src/bin/pgbench/t/001_pgbench_with_server.pl @@ -1091,10 +1091,10 @@ SELECT LEAST(} . join(', ', (':i') x 256) . q{)} 'gset no row', 2, [qr{expected one row, got 0\b}], q{SELECT WHERE FALSE \gset} ], - [ 'gset alone', 1, [qr{gset must follow a SQL command}], q{\gset} ], + [ 'gset alone', 1, [qr{gset must follow an SQL command}], q{\gset} ], [ 'gset no SQL', 1, - [qr{gset must follow a SQL command}], q{\set i +1 + [qr{gset must follow an SQL command}], q{\set i +1 \gset} ], [ @@ -1103,7 +1103,7 @@ SELECT LEAST(} . join(', ', (':i') x 256) . q{)} ], [ 'gset after gset', 1, - [qr{gset must follow a SQL command}], q{SELECT 1 AS i \gset + [qr{gset must follow an SQL command}], q{SELECT 1 AS i \gset \gset} ], [ -- cgit v1.2.3