Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 81a530a

Browse files
committed
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.
1 parent b4d3792 commit 81a530a

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

doc/src/sgml/libpq.sgml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,16 +2196,6 @@ ExecStatusType PQresultStatus(const PGresult *res);
21962196
</listitem>
21972197
</varlistentry>
21982198

2199-
<varlistentry id="libpq-pgres-copy-both">
2200-
<term><literal>PGRES_COPY_BOTH</literal></term>
2201-
<listitem>
2202-
<para>
2203-
Copy In/Out (to and from server) data transfer started. This is
2204-
currently used only for streaming replication.
2205-
</para>
2206-
</listitem>
2207-
</varlistentry>
2208-
22092199
<varlistentry id="libpq-pgres-bad-response">
22102200
<term><literal>PGRES_BAD_RESPONSE</literal></term>
22112201
<listitem>
@@ -2232,6 +2222,16 @@ ExecStatusType PQresultStatus(const PGresult *res);
22322222
</para>
22332223
</listitem>
22342224
</varlistentry>
2225+
2226+
<varlistentry id="libpq-pgres-copy-both">
2227+
<term><literal>PGRES_COPY_BOTH</literal></term>
2228+
<listitem>
2229+
<para>
2230+
Copy In/Out (to and from server) data transfer started. This is
2231+
currently used only for streaming replication.
2232+
</para>
2233+
</listitem>
2234+
</varlistentry>
22352235
</variablelist>
22362236

22372237
If the result status is <literal>PGRES_TUPLES_OK</literal>, then

src/interfaces/libpq/fe-exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ char *const pgresStatus[] = {
3535
"PGRES_TUPLES_OK",
3636
"PGRES_COPY_OUT",
3737
"PGRES_COPY_IN",
38-
"PGRES_COPY_BOTH",
3938
"PGRES_BAD_RESPONSE",
4039
"PGRES_NONFATAL_ERROR",
41-
"PGRES_FATAL_ERROR"
40+
"PGRES_FATAL_ERROR",
41+
"PGRES_COPY_BOTH"
4242
};
4343

4444
/*

src/interfaces/libpq/libpq-fe.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ typedef enum
8585
* contains the result tuples */
8686
PGRES_COPY_OUT, /* Copy Out data transfer in progress */
8787
PGRES_COPY_IN, /* Copy In data transfer in progress */
88-
PGRES_COPY_BOTH, /* Copy In/Out data transfer in progress */
8988
PGRES_BAD_RESPONSE, /* an unexpected response was recv'd from the
9089
* backend */
9190
PGRES_NONFATAL_ERROR, /* notice or warning message */
92-
PGRES_FATAL_ERROR /* query failed */
91+
PGRES_FATAL_ERROR, /* query failed */
92+
PGRES_COPY_BOTH /* Copy In/Out data transfer in progress */
9393
} ExecStatusType;
9494

9595
typedef enum

0 commit comments

Comments
 (0)