Use the correct article for abbreviations
authorDavid Rowley <drowley@postgresql.org>
Fri, 11 Jun 2021 01:38:04 +0000 (13:38 +1200)
committerDavid Rowley <drowley@postgresql.org>
Fri, 11 Jun 2021 01:38:04 +0000 (13:38 +1200)
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

35 files changed:
doc/src/sgml/client-auth.sgml
doc/src/sgml/config.sgml
doc/src/sgml/datatype.sgml
doc/src/sgml/dblink.sgml
doc/src/sgml/ecpg.sgml
doc/src/sgml/extend.sgml
doc/src/sgml/func.sgml
doc/src/sgml/high-availability.sgml
doc/src/sgml/indexam.sgml
doc/src/sgml/libpq.sgml
doc/src/sgml/ltree.sgml
doc/src/sgml/mvcc.sgml
doc/src/sgml/pageinspect.sgml
doc/src/sgml/pgcrypto.sgml
doc/src/sgml/plpgsql.sgml
doc/src/sgml/plpython.sgml
doc/src/sgml/pltcl.sgml
doc/src/sgml/protocol.sgml
doc/src/sgml/ref/alter_opfamily.sgml
doc/src/sgml/ref/create_function.sgml
doc/src/sgml/ref/create_opclass.sgml
doc/src/sgml/ref/create_statistics.sgml
doc/src/sgml/ref/create_trigger.sgml
doc/src/sgml/ref/pg_dump.sgml
doc/src/sgml/ref/pgbench.sgml
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/tablefunc.sgml
doc/src/sgml/tablesample-method.sgml
doc/src/sgml/textsearch.sgml
doc/src/sgml/trigger.sgml
doc/src/sgml/typeconv.sgml
doc/src/sgml/xfunc.sgml
src/backend/executor/functions.c
src/bin/pgbench/pgbench.c
src/bin/pgbench/t/001_pgbench_with_server.pl

index 951af49e9a4d13cc61ea8694442b2d9f52b902ec..02f048911295695c144a55e846722902d3af4332 100644 (file)
@@ -1462,7 +1462,7 @@ omicron         bryanh                  guest1
       <listitem>
        <para>
         Allows for mapping between system and database user names. See
-        <xref linkend="auth-username-maps"/> for details.  For a SSPI/Kerberos
+        <xref linkend="auth-username-maps"/> for details.  For an SSPI/Kerberos
         principal, such as <literal>username@EXAMPLE.COM</literal> (or, less
         commonly, <literal>username/hostbased@EXAMPLE.COM</literal>), the
         user name used for mapping is
index d8c0fd3315de868c09079e99ec5ab92cf925de14..aa3e17824094ce0bcce56410e99e2bd89bf82f76 100644 (file)
@@ -51,7 +51,7 @@
        In general, enclose the value in single quotes, doubling any single
        quotes within the value.  Quotes can usually be omitted if the value
        is a simple number or identifier, however.
-       (Values that match a SQL keyword require quoting in some contexts.)
+       (Values that match an SQL keyword require quoting in some contexts.)
       </para>
      </listitem>
 
@@ -222,7 +222,7 @@ shared_buffers = 128MB
       <productname>PostgreSQL</productname> provides three SQL
       commands to establish configuration defaults.
       The already-mentioned <command>ALTER SYSTEM</command> command
-      provides a SQL-accessible means of changing global defaults; it is
+      provides an SQL-accessible means of changing global defaults; it is
       functionally equivalent to editing <filename>postgresql.conf</filename>.
       In addition, there are two commands that allow setting of defaults
       on a per-database or per-role basis:
@@ -9625,7 +9625,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
         <literal>\'</literal>. However, use of <literal>\'</literal> creates security risks
         because in some client character set encodings, there are multibyte
         characters in which the last byte is numerically equivalent to ASCII
-        <literal>\</literal>.  If client-side code does escaping incorrectly then a
+        <literal>\</literal>.  If client-side code does escaping incorrectly then an
         SQL-injection attack is possible.  This risk can be prevented by
         making the server reject queries in which a quote mark appears to be
         escaped by a backslash.
index 0e8ef958a93e11704fca600717deaec376684ba0..de561cded1e92248501138c34310afc580264a4f 100644 (file)
@@ -1538,7 +1538,7 @@ SELECT '\xDEADBEEF';
    <para>
     The reason that single quotes must be doubled, as shown
     in <xref linkend="datatype-binary-sqlesc"/>, is that this
-    is true for any string literal in a SQL command.  The generic
+    is true for any string literal in an SQL command.  The generic
     string-literal parser consumes the outermost single quotes
     and reduces any pair of single quotes to one data character.
     What the <type>bytea</type> input function sees is just one
index bcf623117c4bd59c0d3fa09997f1044e486a6fb9..4ab38bcc999b1f28e6dc9ed15504a314224fe114 100644 (file)
@@ -1482,14 +1482,14 @@ dblink_get_result(text connname [, bool fail_on_error]) returns setof record
    <title>Return Value</title>
 
    <para>
-    For an async query (that is, a SQL statement returning rows),
+    For an async query (that is, an SQL statement returning rows),
     the function returns the row(s) produced by the query.  To use this
     function, you will need to specify the expected set of columns,
     as previously discussed for <function>dblink</function>.
    </para>
 
    <para>
-    For an async command (that is, a SQL statement not returning rows),
+    For an async command (that is, an SQL statement not returning rows),
     the function returns a single row with a single text column containing
     the command's status string.  It is still necessary to specify that
     the result will have a single text column in the calling <literal>FROM</literal>
@@ -1777,7 +1777,7 @@ dblink_build_sql_insert(text relname,
    <para>
     <function>dblink_build_sql_insert</function> can be useful in doing selective
     replication of a local table to a remote database.  It selects a row
-    from the local table based on primary key, and then builds a SQL
+    from the local table based on primary key, and then builds an SQL
     <command>INSERT</command> command that will duplicate that row, but with
     the primary key values replaced by the values in the last argument.
     (To make an exact copy of the row, just specify the same values for
@@ -1909,7 +1909,7 @@ dblink_build_sql_delete(text relname,
 
    <para>
     <function>dblink_build_sql_delete</function> can be useful in doing selective
-    replication of a local table to a remote database.  It builds a SQL
+    replication of a local table to a remote database.  It builds an SQL
     <command>DELETE</command> command that will delete the row with the given
     primary key values.
    </para>
@@ -2029,7 +2029,7 @@ dblink_build_sql_update(text relname,
    <para>
     <function>dblink_build_sql_update</function> can be useful in doing selective
     replication of a local table to a remote database.  It selects a row
-    from the local table based on primary key, and then builds a SQL
+    from the local table based on primary key, and then builds an SQL
     <command>UPDATE</command> command that will duplicate that row, but with
     the primary key values replaced by the values in the last argument.
     (To make an exact copy of the row, just specify the same values for
index 86c078e17de233262be9b45d21fa2f5292429c5a..9d5505cb84992682006212aaf69877bd90d48b35 100644 (file)
@@ -354,13 +354,13 @@ current=testdb1 (should be testdb1)
   </para>
 
   <para>
-  The third option is to declare a SQL identifier linked to
+  The third option is to declare an SQL identifier linked to
   the connection, for example:
 <programlisting>
 EXEC SQL AT <replaceable>connection-name</replaceable> DECLARE <replaceable>statement-name</replaceable> STATEMENT;
 EXEC SQL PREPARE <replaceable>statement-name</replaceable> FROM :<replaceable>dyn-string</replaceable>;
 </programlisting>
-   Once you link a SQL identifier to a connection, you execute dynamic SQL
+   Once you link an SQL identifier to a connection, you execute dynamic SQL
    without an AT clause. Note that this option behaves like preprocessor
    directives, therefore the link is enabled only in the file.
   </para>
@@ -1542,7 +1542,7 @@ EXEC SQL END DECLARE SECTION;
      variables and vice-versa.  However, when creating a statement ecpg does
      not know the types of the columns, so that it cannot check if a C array
      is input into a corresponding SQL-level array.  When processing the
-     output of a SQL statement, ecpg has the necessary information and thus
+     output of an SQL statement, ecpg has the necessary information and thus
      checks if both are arrays.
     </para>
 
@@ -4348,7 +4348,7 @@ switch (v.sqltype)
       parameters to a prepared query are:
      </para>
      <step><simpara>Create a prepared query (prepared statement)</simpara></step>
-     <step><simpara>Declare a sqlda_t structure as an input SQLDA.</simpara></step>
+     <step><simpara>Declare an sqlda_t structure as an input SQLDA.</simpara></step>
      <step><simpara>Allocate memory area (as sqlda_t structure) for the input SQLDA.</simpara></step>
      <step><simpara>Set (copy) input values in the allocated memory.</simpara></step>
      <step><simpara>Open a cursor with specifying the input SQLDA.</simpara></step>
@@ -4630,7 +4630,7 @@ main(void)
     EXEC SQL PREPARE stmt1 FROM :query;
     EXEC SQL DECLARE cur1 CURSOR FOR stmt1;
 
-    /* Create a SQLDA structure for an input parameter */
+    /* Create an SQLDA structure for an input parameter */
     sqlda2 = (sqlda_t *)malloc(sizeof(sqlda_t) + sizeof(sqlvar_t));
     memset(sqlda2, 0, sizeof(sqlda_t) + sizeof(sqlvar_t));
     sqlda2->sqln = 2; /* a number of input variables */
@@ -6911,7 +6911,7 @@ EXEC SQL [ AT <replaceable class="parameter">connection_name</replaceable> ] DEC
     <title>Description</title>
 
     <para>
-     <command>DECLARE STATEMENT</command> declares a SQL statement identifier.
+     <command>DECLARE STATEMENT</command> declares an SQL statement identifier.
      SQL statement identifier can be associated with the connection.
      When the identifier is used by dynamic SQL statements, the statements
      are executed using the associated connection.
@@ -6945,7 +6945,7 @@ EXEC SQL [ AT <replaceable class="parameter">connection_name</replaceable> ] DEC
       <term><replaceable class="parameter">statement_name</replaceable></term>
       <listitem>
        <para>
-        The name of a SQL statement identifier, either as an SQL identifier or a host variable.
+        The name of an SQL statement identifier, either as an SQL identifier or a host variable.
        </para>
       </listitem>
      </varlistentry>
index dae57375748faadc820c3aabd060c457daede49f..e928894726c8f96b6fc32f81253f62a4953f999c 100644 (file)
@@ -1441,7 +1441,7 @@ include $(PGXS)
     and include the global <acronym>PGXS</acronym> makefile.
     Here is an example that builds an extension module named
     <literal>isbn_issn</literal>, consisting of a shared library containing
-    some C code, an extension control file, a SQL script, an include file
+    some C code, an extension control file, an SQL script, an include file
     (only needed if other modules might need to access the extension functions
     without going via SQL), and a documentation text file:
 <programlisting>
index 08b07f561efa3c33743183d9908cd3e7d8db33a9..fbc80c1403db1b16d47c447e0a0dc6e7657a8271 100644 (file)
@@ -15196,7 +15196,7 @@ table2-mapping
         <returnvalue>json</returnvalue>
        </para>
        <para>
-        Converts a SQL array to a JSON array.  The behavior is the same
+        Converts an SQL array to a JSON array.  The behavior is the same
         as <function>to_json</function> except that line feeds will be added
         between top-level array elements if the optional boolean parameter is
         true.
@@ -15216,7 +15216,7 @@ table2-mapping
         <returnvalue>json</returnvalue>
        </para>
        <para>
-        Converts a SQL composite value to a JSON object.  The behavior is the
+        Converts an SQL composite value to a JSON object.  The behavior is the
         same as <function>to_json</function> except that line feeds will be
         added between top-level elements if the optional boolean parameter is
         true.
@@ -15629,7 +15629,7 @@ table2-mapping
         <itemizedlist spacing="compact">
          <listitem>
           <para>
-           A JSON null value is converted to a SQL null in all cases.
+           A JSON null value is converted to an SQL null in all cases.
           </para>
          </listitem>
          <listitem>
@@ -16152,7 +16152,7 @@ table2-mapping
         <literal>string</literal>, <literal>number</literal>,
         <literal>boolean</literal>, and <literal>null</literal>.
         (The <literal>null</literal> result should not be confused
-        with a SQL NULL; see the examples.)
+        with an SQL NULL; see the examples.)
        </para>
        <para>
         <literal>json_typeof('-123.4')</literal>
index c072110ba60d0dc45a14a090a27dc09e41e68482..22af7dbf51b28478d159abc100c83b4f8521ca99 100644 (file)
@@ -2194,7 +2194,7 @@ HINT:  You can then restart the server after making the necessary configuration
     Currently, temporary table creation is not allowed during read only
     transactions, so in some cases existing scripts will not run correctly.
     This restriction might be relaxed in a later release. This is
-    both a SQL Standard compliance issue and a technical issue.
+    both an SQL Standard compliance issue and a technical issue.
    </para>
 
    <para>
index 29fa3b793381bfa358cbc5cb7354fcb8c738c3b9..b2326b72e3cf2449c5e9518bef40503808eb90b3 100644 (file)
@@ -338,7 +338,7 @@ aminsert (Relation indexRelation,
 
   <para>
    If the index AM wishes to cache data across successive index insertions
-   within a SQL statement, it can allocate space
+   within an SQL statement, it can allocate space
    in <literal>indexInfo-&gt;ii_Context</literal> and store a pointer to the
    data in <literal>indexInfo-&gt;ii_AmCache</literal> (which will be NULL
    initially).
index ca905b80a6dbfdc3313445671b187d09d0ca7c05..9e6e085385466656ea82ce9d620e313778bbcc3e 100644 (file)
@@ -3468,7 +3468,7 @@ char *PQresultErrorField(const PGresult *res, int fieldcode);
           <listitem>
            <para>
             The text of a failed internally-generated command.  This could
-            be, for example, a SQL query issued by a PL/pgSQL function.
+            be, for example, an SQL query issued by a PL/pgSQL function.
            </para>
           </listitem>
          </varlistentry>
@@ -5468,7 +5468,7 @@ UPDATE mytable SET x = x + 1 WHERE id = 42;
   </indexterm>
 
   <para>
-   Ordinarily, <application>libpq</application> collects a SQL command's
+   Ordinarily, <application>libpq</application> collects an SQL command's
    entire result and returns it to the application as a single
    <structname>PGresult</structname>.  This can be unworkable for commands
    that return a large number of rows.  For such cases, applications can use
index 06a983c075be4666f2b1686d5ab5fb2e27457b78..436be76bfaa4162e0bce095c264b954e85995a55 100644 (file)
@@ -804,7 +804,7 @@ ltreetest=&gt; SELECT subpath(path,0,2)||'Space'||subpath(path,2) FROM test WHER
   </para>
 
   <para>
-   We could simplify this by creating a SQL function that inserts a label
+   We could simplify this by creating an SQL function that inserts a label
    at a specified position in a path:
 <screen>
 CREATE FUNCTION ins_label(ltree, int, text) RETURNS ltree
index 6cb9c631613d8914c7a2e7b91c4a6500383ffa06..d358bbe4a6a0719381aa07bfa9d2b11d3a9c85ef 100644 (file)
@@ -703,7 +703,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
     transactions might do, or it will not successfully commit.  It is
     important that an environment which uses this technique have a
     generalized way of handling serialization failures (which always return
-    with a SQLSTATE value of '40001'), because it will be very hard to
+    with an SQLSTATE value of '40001'), because it will be very hard to
     predict exactly which transactions might contribute to the read/write
     dependencies and need to be rolled back to prevent serialization
     anomalies.  The monitoring of read/write dependencies has a cost, as does
index 59620faec00f9404607713668d053579546bcd5f..24b5e463ed9a39b9baa986c27c58b43b51e83a16 100644 (file)
@@ -136,7 +136,7 @@ test=# SELECT page_checksum(get_raw_page('pg_class', 0), 0);
     <listitem>
      <para>
       <function>fsm_page_contents</function> shows the internal node structure
-      of a FSM page.  For example:
+      of an FSM page.  For example:
 <screen>
 test=# SELECT fsm_page_contents(get_raw_page('pg_class', 'fsm', 0));
 </screen>
index 13770dfc6f66cecfde5dbef24a94e0de2ed85c91..c4dce94001b9d386548a7ed6e3e7c04e265626b9 100644 (file)
@@ -521,7 +521,7 @@ gen_salt(type text [, iter_count integer ]) returns text
    </listitem>
    <listitem>
     <para>
-     An SHA1 hash of the random prefix and data is appended.
+     A SHA1 hash of the random prefix and data is appended.
     </para>
    </listitem>
    <listitem>
index a3edde35039b0460a74fc42a74017374b3cdedab..4cd4bcba802d03e139077c63f6d3a48f81087243 100644 (file)
@@ -1099,7 +1099,7 @@ PERFORM <replaceable>query</replaceable>;
       One might expect that writing <command>SELECT</command> directly
       would accomplish this result, but at
       present the only accepted way to do it is
-      <command>PERFORM</command>.  A SQL command that can return rows,
+      <command>PERFORM</command>.  An SQL command that can return rows,
       such as <command>SELECT</command>, will be rejected as an error
       unless it has an <literal>INTO</literal> clause as discussed in the
       next section.
@@ -1128,7 +1128,7 @@ PERFORM create_mv('cs_session_page_requests_mv', my_query);
     </indexterm>
 
     <para>
-     The result of a SQL command yielding a single row (possibly of multiple
+     The result of an SQL command yielding a single row (possibly of multiple
      columns) can be assigned to a record variable, row-type variable, or list
      of scalar variables.  This is done by writing the base SQL command and
      adding an <literal>INTO</literal> clause.  For example,
@@ -1317,7 +1317,7 @@ EXECUTE <replaceable class="command">command-string</replaceable> <optional> INT
 
     <para>
      The <literal>INTO</literal> clause specifies where the results of
-     a SQL command returning rows should be assigned. If a row variable
+     an SQL command returning rows should be assigned. If a row variable
      or variable list is provided, it must exactly match the structure
      of the command's results; if a
      record variable is provided, it will configure itself to match the
@@ -2659,7 +2659,7 @@ END LOOP <optional> <replaceable>label</replaceable> </optional>;
 
     <para>
      The <literal>FOREACH</literal> loop is much like a <literal>FOR</literal> loop,
-     but instead of iterating through the rows returned by a SQL query,
+     but instead of iterating through the rows returned by an SQL query,
      it iterates through the elements of an array value.
      (In general, <literal>FOREACH</literal> is meant for looping through
      components of a composite-valued expression; variants for looping
@@ -4726,7 +4726,7 @@ INSERT INTO foo (foo) VALUES (foo(foo));
 
    <para>
     Another way to understand this is that variable substitution can only
-    insert data values into a SQL command; it cannot dynamically change which
+    insert data values into an SQL command; it cannot dynamically change which
     database objects are referenced by the command.  (If you want to do
     that, you must build a command string dynamically, as explained in
     <xref linkend="plpgsql-statements-executing-dyn"/>.)
@@ -4748,7 +4748,7 @@ INSERT INTO dest (col) SELECT foo + bar FROM src;
 
    <para>
     By default, <application>PL/pgSQL</application> will report an error if a name
-    in a SQL statement could refer to either a variable or a table column.
+    in an SQL statement could refer to either a variable or a table column.
     You can fix such a problem by renaming the variable or column,
     or by qualifying the ambiguous reference, or by telling
     <application>PL/pgSQL</application> which interpretation to prefer.
@@ -5384,7 +5384,7 @@ HINT:  Make sure the query returns the exact list of columns.
     <itemizedlist>
      <listitem>
       <para>
-       If a name used in a SQL command could be either a column name of a
+       If a name used in an SQL command could be either a column name of a
        table used in the command or a reference to a variable of the function,
        <application>PL/SQL</application> treats it as a column name.
        By default, <application>PL/pgSQL</application> will throw an error
index c1651000a3d8b926d4e763ba5ab124117255fe78..c2540b8ec9d383037b1f6f20826e40f15a4ad680 100644 (file)
@@ -577,7 +577,7 @@ AS $$
 $$ LANGUAGE plpythonu;
 </programlisting>
 
-       To return a SQL null for any column, insert <symbol>None</symbol> at
+       To return an SQL null for any column, insert <symbol>None</symbol> at
        the corresponding position.
       </para>
       <para>
@@ -605,7 +605,7 @@ $$ LANGUAGE plpythonu;
 
        Any extra dictionary key/value pairs are ignored. Missing keys are
        treated as errors.
-       To return a SQL null value for any column, insert
+       To return an SQL null value for any column, insert
        <symbol>None</symbol> with the corresponding column name as the key.
       </para>
      </listitem>
index 032e0b3a6ba82567a2401e0769a42a6920afca70..1759fc44985d6dde76126b810340d4ff452ba1a7 100644 (file)
@@ -475,7 +475,7 @@ $$ LANGUAGE pltcl;
       <listitem>
        <para>
         The Tcl script contained in <replaceable>command</replaceable> is
-        executed within a SQL subtransaction.  If the script returns an
+        executed within an SQL subtransaction.  If the script returns an
         error, that entire subtransaction is rolled back before returning the
         error out to the surrounding Tcl code.
         See <xref linkend="pltcl-subtransactions"/> for more details and an
@@ -854,7 +854,7 @@ CREATE EVENT TRIGGER tcl_a_snitch ON ddl_command_start EXECUTE FUNCTION tclsnitc
      PL/Tcl's <function>elog</function> command.  Such errors can be caught
      within Tcl using the Tcl <function>catch</function> command.  If an
      error is not caught but is allowed to propagate out to the top level of
-     execution of the PL/Tcl function, it is reported as a SQL error in the
+     execution of the PL/Tcl function, it is reported as an SQL error in the
      function's calling query.
     </para>
 
@@ -867,7 +867,7 @@ CREATE EVENT TRIGGER tcl_a_snitch ON ddl_command_start EXECUTE FUNCTION tclsnitc
      subtransaction, which is rolled back on error, so that any
      partially-completed operation is automatically cleaned up.)
      Again, if an error propagates out to the top level without being caught,
-     it turns back into a SQL error.
+     it turns back into an SQL error.
     </para>
 
     <para>
index 2f4dde3bebd4942cccf4b9d45b0bda8e079478fe..bc2a2feb0b95173444d2cde69f1b3ee1c0e6b2a5 100644 (file)
       <term>AuthenticationSSPI</term>
       <listitem>
        <para>
-        The frontend must now initiate a SSPI negotiation. The frontend
+        The frontend must now initiate an SSPI negotiation. The frontend
         will send a GSSResponse with the first part of the SSPI
         data stream in response to this. If further messages are needed,
         the server will respond with AuthenticationGSSContinue.
@@ -1605,7 +1605,7 @@ more details on SCRAM-SHA-256 and SCRAM-SHA-256-PLUS.
 <para>
   One or more server-challenge and client-response message will follow. Each
   server-challenge is sent in an AuthenticationSASLContinue message, followed
-  by a response from client in an SASLResponse message. The particulars of
+  by a response from client in a SASLResponse message. The particulars of
   the messages are mechanism specific.
 </para>
 </step>
@@ -6226,7 +6226,7 @@ message.
 <listitem>
 <para>
         Internal query: the text of a failed internally-generated command.
-        This could be, for example, a SQL query issued by a PL/pgSQL function.
+        This could be, for example, an SQL query issued by a PL/pgSQL function.
 </para>
 </listitem>
 </varlistentry>
index b3b5d61a852e697a03ad07ae034a258b986f8e69..b2e5b9b72ec8bdf1c191ccd6224c2bdf25a47ced 100644 (file)
@@ -269,7 +269,7 @@ ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class="
   </para>
 
   <para>
-   The operators should not be defined by SQL functions.  A SQL function
+   The operators should not be defined by SQL functions.  An SQL function
    is likely to be inlined into the calling query, which will prevent
    the optimizer from recognizing that the query matches an index.
   </para>
index e43705d069cfa643b41cc5e25e58f72748bfe182..180e5f5c1f56079eccdfd6c97a00642cf0569b7a 100644 (file)
@@ -701,7 +701,7 @@ CREATE FUNCTION foo(int, int default 42) ...
   <title>Examples</title>
 
   <para>
-   Add two integers using a SQL function:
+   Add two integers using an SQL function:
 <programlisting>
 CREATE FUNCTION add(integer, integer) RETURNS integer
     AS 'select $1 + $2;'
index 4f1bfae82238ecc098a5533aa15ff996e4a7ce82..f1d6a4cbbe286bbe223d7842c481cd3ff56dd8bd 100644 (file)
@@ -265,7 +265,7 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL
   </para>
 
   <para>
-   The operators should not be defined by SQL functions.  A SQL function
+   The operators should not be defined by SQL functions.  An SQL function
    is likely to be inlined into the calling query, which will prevent
    the optimizer from recognizing that the query matches an index.
   </para>
index 988f4c573ff5e86c6248c0e6bb8458cfd0d65e6f..9a8c904c0885b7cd8e0757fb3def2422d5795aa2 100644 (file)
@@ -208,7 +208,7 @@ EXPLAIN ANALYZE SELECT * FROM t1 WHERE (a = 1) AND (b = 0);
 
   <para>
    Create table <structname>t2</structname> with two perfectly correlated columns
-   (containing identical data), and a MCV list on those columns:
+   (containing identical data), and an MCV list on those columns:
 
 <programlisting>
 CREATE TABLE t2 (
index 561af989a4af5bffcd1fb16a9d8421c9263a67ce..3f4b5acc7b7ed9ce41b1e9aea928c09acbb77827 100644 (file)
@@ -515,7 +515,7 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</
    as <literal>ON UPDATE CASCADE</literal> or <literal>ON DELETE SET NULL</literal>, are
    treated as part of the SQL command that caused them (note that such
    actions are never deferred).  Relevant triggers on the affected table will
-   be fired, so that this provides another way in which a SQL command might
+   be fired, so that this provides another way in which an SQL command might
    fire triggers not directly matching its type.  In simple cases, triggers
    that request transition relations will see all changes caused in their
    table by a single original SQL command as a single transition relation.
index 5ddadc11f2eee15d92d766efbe0454d05826b122..a6c0788592b06f5baab49791b3e3f09586dbdad2 100644 (file)
@@ -1413,7 +1413,7 @@ CREATE DATABASE foo WITH TEMPLATE template0;
   <title>Examples</title>
 
   <para>
-   To dump a database called <literal>mydb</literal> into a SQL-script file:
+   To dump a database called <literal>mydb</literal> into an SQL-script file:
 <screen>
 <prompt>$</prompt> <userinput>pg_dump mydb &gt; db.sql</userinput>
 </screen>
index 8eb4f538d5b65a7ed34c6e8a00c424018efe2406..0c60077e1f9b8425f12b6355e805a7ab5ac9e783 100644 (file)
@@ -1012,7 +1012,7 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
     Before <productname>PostgreSQL</productname> 9.6, SQL commands in script files
     were terminated by newlines, and so they could not be continued across
     lines.  Now a semicolon is <emphasis>required</emphasis> to separate consecutive
-    SQL commands (though a SQL command does not need one if it is followed
+    SQL commands (though an SQL command does not need one if it is followed
     by a meta command).  If you need to create a script file that works with
     both old and new versions of <application>pgbench</application>, be sure to write
     each SQL command on a single line ending with a semicolon.
@@ -1030,7 +1030,7 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
    <xref linkend="pgbench-automatic-variables"/>. A value specified for these
    variables using <option>-D</option> takes precedence over the automatic presets.
    Once set, a variable's
-   value can be inserted into a SQL command by writing
+   value can be inserted into an SQL command by writing
    <literal>:</literal><replaceable>variablename</replaceable>.  When running more than
    one client session, each session has its own set of variables.
    <application>pgbench</application> supports up to 255 variable uses in one
index dd36830a2dc7a348b939a3f7cef1a68e1b311f5f..a8dfc41e406894b6d946ca489f500b9d859d3a70 100644 (file)
@@ -1044,7 +1044,7 @@ testdb=&gt;
         For <literal>\copy ... from stdin</literal>, data rows are read from the same
         source that issued the command, continuing until <literal>\.</literal>
         is read or the stream reaches <acronym>EOF</acronym>. This option is useful
-        for populating tables in-line within a SQL script file.
+        for populating tables in-line within an SQL script file.
         For <literal>\copy ... to stdout</literal>, output is sent to the same place
         as <application>psql</application> command output, and
         the <literal>COPY <replaceable>count</replaceable></literal> command status is
@@ -2243,7 +2243,7 @@ Tue Oct 26 21:40:57 CEST 1999
         <listitem>
         <para>
          Sends the current query buffer to the server, then treats
-         each column of each row of the query's output (if any) as a SQL
+         each column of each row of the query's output (if any) as an SQL
          statement to be executed.  For example, to create an index on each
          column of <structname>my_table</structname>:
 <programlisting>
@@ -3510,7 +3510,7 @@ testdb=&gt; <userinput>\setenv LESS -imx4F</userinput>
         </para>
 
         <para>
-        Normally, <application>psql</application> will dispatch a SQL command to the
+        Normally, <application>psql</application> will dispatch an SQL command to the
         server as soon as it reaches the command-ending semicolon, even if
         more input remains on the current line.  Thus for example entering
 <programlisting>
index 356e2b0f0021fabb92618af2f5da71799daadb4d..808162b89b0b535756984da5646f62dc34f17b23 100644 (file)
@@ -198,13 +198,13 @@ row1    val11   val12   val13   ...
 row2    val21   val22   val23   ...
 ...
 </programlisting>
-    The <function>crosstab</function> function takes a text parameter that is a SQL
+    The <function>crosstab</function> function takes a text parameter that is an SQL
     query producing raw data formatted in the first way, and produces a table
     formatted in the second way.
    </para>
 
    <para>
-    The <parameter>sql</parameter> parameter is a SQL statement that produces
+    The <parameter>sql</parameter> parameter is an SQL statement that produces
     the source set of data. This statement must return one
     <structfield>row_name</structfield> column, one
     <structfield>category</structfield> column, and one
@@ -459,7 +459,7 @@ crosstab(text source_sql, text category_sql)
    </para>
 
    <para>
-    <parameter>source_sql</parameter> is a SQL statement that produces the
+    <parameter>source_sql</parameter> is an SQL statement that produces the
     source set of data.  This statement must return one
     <structfield>row_name</structfield> column, one
     <structfield>category</structfield> column, and one
@@ -493,7 +493,7 @@ SELECT row_name, extra_col, cat, value FROM foo ORDER BY 1;
    </para>
 
    <para>
-    <parameter>category_sql</parameter> is a SQL statement that produces
+    <parameter>category_sql</parameter> is an SQL statement that produces
     the set of categories. This statement must return only one column.
     It must produce at least one row, or an error will be generated.
     Also, it must not produce duplicate values, or an error will be
index 1c9f1bf44bfb7850a888faedd551f400f665c279..c821941b71bc5d72444d662b59f7860a48170dfa 100644 (file)
@@ -28,7 +28,7 @@ method_name(internal) RETURNS tsm_handler
   The name of the function is the same method name appearing in the
   <literal>TABLESAMPLE</literal> clause.  The <type>internal</type> argument is a dummy
   (always having value zero) that simply serves to prevent this function from
-  being called directly from a SQL command.
+  being called directly from an SQL command.
   The result of the function must be a palloc'd struct of
   type <type>TsmRoutine</type>, which contains pointers to support functions for
   the sampling method.  These support functions are plain C functions and
index 168d84f06b5e1fb29fcb4853920fd72899fdc739..20db7b7afe6c3a219f9eccd435705b16b510ec7a 100644 (file)
@@ -1790,7 +1790,7 @@ SELECT ts_rewrite('a &amp; b'::tsquery, 'a'::tsquery, 'c'::tsquery);
       <listitem>
        <para>
         This form of <function>ts_rewrite</function> accepts a starting
-        <replaceable>query</replaceable> and a SQL <replaceable>select</replaceable> command, which
+        <replaceable>query</replaceable> and an SQL <replaceable>select</replaceable> command, which
         is given as a text string.  The <replaceable>select</replaceable> must yield two
         columns of <type>tsquery</type> type.  For each row of the
         <replaceable>select</replaceable> result, occurrences of the first column value
index 4a0e74652f7bf6b060c1e36340eff10414f30310..f1a845f756864d4e2d0e085786c13e71da60a24f 100644 (file)
        trigger <emphasis>will</emphasis> see the effects of data
        changes for rows previously processed in the same outer
        command.  This requires caution, since the ordering of these
-       change events is not in general predictable; a SQL command that
+       change events is not in general predictable; an SQL command that
        affects multiple rows can visit the rows in any order.
       </para>
      </listitem>
index 103e4c5d99d6feb83d0dbde71bc099910488a1d9..2874874248668830fe49a9e91d3bbe8768737974 100644 (file)
@@ -1222,7 +1222,7 @@ section consider all of their inputs in one resolution step.
 
 <para>
 The rules given in the preceding sections will result in assignment
-of non-<type>unknown</type> data types to all expressions in a SQL query,
+of non-<type>unknown</type> data types to all expressions in an SQL query,
 except for unspecified-type literals that appear as simple output
 columns of a <command>SELECT</command> command.  For example, in
 
index 3771401c01dd3f90f961760ad7fe552b41337467..584d389d4586fbd008603d0d9c595cfca5c362d5 100644 (file)
      must be a <command>SELECT</command> or have a <literal>RETURNING</literal>
      clause that returns whatever is
      specified as the function's return type.  Alternatively, if you
-     want to define a SQL function that performs actions but has no
+     want to define an SQL function that performs actions but has no
      useful value to return, you can define it as returning <type>void</type>.
      For example, this function removes rows with negative salaries from
      the <literal>emp</literal> table:
@@ -234,8 +234,8 @@ CALL clean_emp();
 
     <note>
      <para>
-      The entire body of a SQL function is parsed before any of it is
-      executed.  While a SQL function can contain commands that alter
+      The entire body of an SQL function is parsed before any of it is
+      executed.  While an SQL function can contain commands that alter
       the system catalogs (e.g., <command>CREATE TABLE</command>), the effects
       of such commands will not be visible during parse analysis of
       later commands in the function.  Thus, for example,
@@ -243,7 +243,7 @@ CALL clean_emp();
       will not work as desired if packaged up into a single SQL function,
       since <structname>foo</structname> won't exist yet when the <command>INSERT</command>
       command is parsed.  It's recommended to use <application>PL/pgSQL</application>
-      instead of a SQL function in this type of situation.
+      instead of an SQL function in this type of situation.
      </para>
    </note>
 
@@ -267,7 +267,7 @@ CALL clean_emp();
    </indexterm>
 
     <para>
-     Arguments of a SQL function can be referenced in the function
+     Arguments of an SQL function can be referenced in the function
      body using either names or numbers.  Examples of both methods appear
      below.
     </para>
@@ -1473,7 +1473,7 @@ SELECT concat_values('|', 1, 4, 2);
     </indexterm>
 
     <para>
-     When a SQL function has one or more parameters of collatable data types,
+     When an SQL function has one or more parameters of collatable data types,
      a collation is identified for each function call depending on the
      collations assigned to the actual arguments, as described in <xref
      linkend="collation"/>.  If a collation is successfully identified
@@ -1508,7 +1508,7 @@ $$ LANGUAGE SQL;
 
     <para>
      If no common collation can be identified among the actual arguments,
-     then a SQL function treats its parameters as having their data types'
+     then an SQL function treats its parameters as having their data types'
      default collation (which is usually the database's default collation,
      but could be different for parameters of domain types).
     </para>
@@ -2952,7 +2952,7 @@ HeapTupleGetDatum(HeapTuple tuple)
      save enough state across calls to remember what it was doing and
      return the correct next item on each call.
      In the other method, called <firstterm>Materialize</firstterm> mode,
-     a SRF fills and returns a tuplestore object containing its
+     an SRF fills and returns a tuplestore object containing its
      entire result; then only one call occurs for the whole result, and
      no inter-call state is needed.
     </para>
@@ -3375,7 +3375,7 @@ CREATE FUNCTION make_array(anyelement) RETURNS anyarray
      There is a variant of polymorphism that is only available to C-language
      functions: they can be declared to take parameters of type
      <literal>"any"</literal>.  (Note that this type name must be double-quoted,
-     since it's also a SQL reserved word.)  This works like
+     since it's also an SQL reserved word.)  This works like
      <type>anyelement</type> except that it does not constrain different
      <literal>"any"</literal> arguments to be the same type, nor do they help
      determine the function's result type.  A C-language function can also
@@ -3544,7 +3544,7 @@ if (!ptr)
 
    <para>
     It is also possible to attach a <firstterm>planner support
-    function</firstterm> to a SQL-callable function (called
+    function</firstterm> to an SQL-callable function (called
     its <firstterm>target function</firstterm>), and thereby provide
     knowledge about the target function that is too complex to be
     represented declaratively.  Planner support functions have to be
index 32668f85a1dbe6fe63da1158f5b98cdc4617d0ee..e2ea51aafe52086898afc1367725dd423f03cc8a 100644 (file)
@@ -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))));
            }
 
index dc84b7b9b78907ef2291edba61306a80047da23d..d7479925cb35a88c720fe6e1037e782f41f4541c 100644 (file)
@@ -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 */
index 9cc5270e02c914d498ba5fbb18d3bed5d33b71e7..55b3c3f6fdd5ab72c5d0797a98cc34bb7ebef6e1 100644 (file)
@@ -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}
    ],
    [