Fix ill-advised placement of PGRES_COPY_BOTH enum value.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 28 Dec 2010 16:02:10 +0000 (11:02 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 28 Dec 2010 16:02:10 +0000 (11:02 -0500)
It must be added at the end of the ExecStatusType enum to avoid ABI
breakage compared to previous libpq versions.  Noted by Magnus.

doc/src/sgml/libpq.sgml
src/interfaces/libpq/fe-exec.c
src/interfaces/libpq/libpq-fe.h

index 7e86859e25260ec4968adf2720971ab0b7699932..da7b820db6d59c52ac5c51ec9e26118bc1d7d457 100644 (file)
@@ -2196,16 +2196,6 @@ ExecStatusType PQresultStatus(const PGresult *res);
           </listitem>
          </varlistentry>
 
-         <varlistentry id="libpq-pgres-copy-both">
-          <term><literal>PGRES_COPY_BOTH</literal></term>
-          <listitem>
-           <para>
-            Copy In/Out (to and from server) data transfer started.  This is
-            currently used only for streaming replication.
-           </para>
-          </listitem>
-         </varlistentry>
-
          <varlistentry id="libpq-pgres-bad-response">
           <term><literal>PGRES_BAD_RESPONSE</literal></term>
           <listitem>
@@ -2232,6 +2222,16 @@ ExecStatusType PQresultStatus(const PGresult *res);
            </para>
           </listitem>
          </varlistentry>
+
+         <varlistentry id="libpq-pgres-copy-both">
+          <term><literal>PGRES_COPY_BOTH</literal></term>
+          <listitem>
+           <para>
+            Copy In/Out (to and from server) data transfer started.  This is
+            currently used only for streaming replication.
+           </para>
+          </listitem>
+         </varlistentry>
         </variablelist>
 
         If the result status is <literal>PGRES_TUPLES_OK</literal>, then
index 9858faeaa64616e140d382417c7392ecaf0f6daa..7bb7fbe557e96b3efbf2ad795b8bb28af6858aac 100644 (file)
@@ -35,10 +35,10 @@ char       *const pgresStatus[] = {
    "PGRES_TUPLES_OK",
    "PGRES_COPY_OUT",
    "PGRES_COPY_IN",
-   "PGRES_COPY_BOTH",
    "PGRES_BAD_RESPONSE",
    "PGRES_NONFATAL_ERROR",
-   "PGRES_FATAL_ERROR"
+   "PGRES_FATAL_ERROR",
+   "PGRES_COPY_BOTH"
 };
 
 /*
index 6075ea8151ec96497a36f9a0c693f6f248cfe0c1..4eea115f378499a9b6a32891b743a45712b789e6 100644 (file)
@@ -85,11 +85,11 @@ typedef enum
                                 * contains the result tuples */
    PGRES_COPY_OUT,             /* Copy Out data transfer in progress */
    PGRES_COPY_IN,              /* Copy In data transfer in progress */
-   PGRES_COPY_BOTH,            /* Copy In/Out data transfer in progress */
    PGRES_BAD_RESPONSE,         /* an unexpected response was recv'd from the
                                 * backend */
    PGRES_NONFATAL_ERROR,       /* notice or warning message */
-   PGRES_FATAL_ERROR           /* query failed */
+   PGRES_FATAL_ERROR,          /* query failed */
+   PGRES_COPY_BOTH             /* Copy In/Out data transfer in progress */
 } ExecStatusType;
 
 typedef enum