Skip to content

Commit 2c86077

Browse files
committed
struct PQWalReceiverFunctions: use designated initializers
We now require that compilers support this, and it makes the code easier to trace, so change it. I'm fixated on this particular struct because I've had to navigate around it a number of times, but there are others elsewhere that could use the same treatment. Discussion: https://postgr.es/m/[email protected]
1 parent 4e6dcbb commit 2c86077

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/backend/replication/libpqwalreceiver/libpqwalreceiver.c

+15-15
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,21 @@ static WalRcvExecResult *libpqrcv_exec(WalReceiverConn *conn,
8282
static void libpqrcv_disconnect(WalReceiverConn *conn);
8383

8484
static WalReceiverFunctionsType PQWalReceiverFunctions = {
85-
libpqrcv_connect,
86-
libpqrcv_check_conninfo,
87-
libpqrcv_get_conninfo,
88-
libpqrcv_get_senderinfo,
89-
libpqrcv_identify_system,
90-
libpqrcv_server_version,
91-
libpqrcv_readtimelinehistoryfile,
92-
libpqrcv_startstreaming,
93-
libpqrcv_endstreaming,
94-
libpqrcv_receive,
95-
libpqrcv_send,
96-
libpqrcv_create_slot,
97-
libpqrcv_get_backend_pid,
98-
libpqrcv_exec,
99-
libpqrcv_disconnect
85+
.walrcv_connect = libpqrcv_connect,
86+
.walrcv_check_conninfo = libpqrcv_check_conninfo,
87+
.walrcv_get_conninfo = libpqrcv_get_conninfo,
88+
.walrcv_get_senderinfo = libpqrcv_get_senderinfo,
89+
.walrcv_identify_system = libpqrcv_identify_system,
90+
.walrcv_server_version = libpqrcv_server_version,
91+
.walrcv_readtimelinehistoryfile = libpqrcv_readtimelinehistoryfile,
92+
.walrcv_startstreaming = libpqrcv_startstreaming,
93+
.walrcv_endstreaming = libpqrcv_endstreaming,
94+
.walrcv_receive = libpqrcv_receive,
95+
.walrcv_send = libpqrcv_send,
96+
.walrcv_create_slot = libpqrcv_create_slot,
97+
.walrcv_get_backend_pid = libpqrcv_get_backend_pid,
98+
.walrcv_exec = libpqrcv_exec,
99+
.walrcv_disconnect = libpqrcv_disconnect
100100
};
101101

102102
/* Prototypes for private functions */

0 commit comments

Comments
 (0)