1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00

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.
This commit is contained in:
Tom Lane
2010-12-28 11:02:10 -05:00
parent b4d3792daa
commit 81a530a65e
3 changed files with 14 additions and 14 deletions

View File

@ -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);
</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

View File

@ -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"
}; };
/* /*

View File

@ -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