Commit 81a530a6 authored by Tom Lane's avatar Tom Lane

Fix ill-advised placement of PGRES_COPY_BOTH enum value.

It must be added at the end of the ExecStatusType enum to avoid ABI
breakage compared to previous libpq versions.  Noted by Magnus.
parent b4d3792d
...@@ -2196,16 +2196,6 @@ ExecStatusType PQresultStatus(const PGresult *res); ...@@ -2196,16 +2196,6 @@ ExecStatusType PQresultStatus(const PGresult *res);
</listitem> </listitem>
</varlistentry> </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"> <varlistentry id="libpq-pgres-bad-response">
<term><literal>PGRES_BAD_RESPONSE</literal></term> <term><literal>PGRES_BAD_RESPONSE</literal></term>
<listitem> <listitem>
...@@ -2232,6 +2222,16 @@ ExecStatusType PQresultStatus(const PGresult *res); ...@@ -2232,6 +2222,16 @@ ExecStatusType PQresultStatus(const PGresult *res);
</para> </para>
</listitem> </listitem>
</varlistentry> </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> </variablelist>
If the result status is <literal>PGRES_TUPLES_OK</literal>, then If the result status is <literal>PGRES_TUPLES_OK</literal>, then
......
...@@ -35,10 +35,10 @@ char *const pgresStatus[] = { ...@@ -35,10 +35,10 @@ char *const pgresStatus[] = {
"PGRES_TUPLES_OK", "PGRES_TUPLES_OK",
"PGRES_COPY_OUT", "PGRES_COPY_OUT",
"PGRES_COPY_IN", "PGRES_COPY_IN",
"PGRES_COPY_BOTH",
"PGRES_BAD_RESPONSE", "PGRES_BAD_RESPONSE",
"PGRES_NONFATAL_ERROR", "PGRES_NONFATAL_ERROR",
"PGRES_FATAL_ERROR" "PGRES_FATAL_ERROR",
"PGRES_COPY_BOTH"
}; };
/* /*
......
...@@ -85,11 +85,11 @@ typedef enum ...@@ -85,11 +85,11 @@ typedef enum
* contains the result tuples */ * contains the result tuples */
PGRES_COPY_OUT, /* Copy Out data transfer in progress */ PGRES_COPY_OUT, /* Copy Out data transfer in progress */
PGRES_COPY_IN, /* Copy In 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 PGRES_BAD_RESPONSE, /* an unexpected response was recv'd from the
* backend */ * backend */
PGRES_NONFATAL_ERROR, /* notice or warning message */ 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; } ExecStatusType;
typedef enum typedef enum
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment