git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4e6dcbb)
struct PQWalReceiverFunctions: use designated initializers
2022年8月11日 10:07:05 +0000 (12:07 +0200)
2022年8月11日 10:07:05 +0000 (12:07 +0200)
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/20220810140300.ixhbmm4svo5yypv6@alvherre.pgsql


diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
index da9c359af103e4f07444ce5f12be203aa1141784..2865024524513e9b37fdcc624dd20a783fb47411 100644 (file)
--- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
+++ b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
@@ -82,21 +82,21 @@ static WalRcvExecResult *libpqrcv_exec(WalReceiverConn *conn,
static void libpqrcv_disconnect(WalReceiverConn *conn);
static WalReceiverFunctionsType PQWalReceiverFunctions = {
- libpqrcv_connect,
- libpqrcv_check_conninfo,
- libpqrcv_get_conninfo,
- libpqrcv_get_senderinfo,
- libpqrcv_identify_system,
- libpqrcv_server_version,
- libpqrcv_readtimelinehistoryfile,
- libpqrcv_startstreaming,
- libpqrcv_endstreaming,
- libpqrcv_receive,
- libpqrcv_send,
- libpqrcv_create_slot,
- libpqrcv_get_backend_pid,
- libpqrcv_exec,
- libpqrcv_disconnect
+ .walrcv_connect = libpqrcv_connect,
+ .walrcv_check_conninfo = libpqrcv_check_conninfo,
+ .walrcv_get_conninfo = libpqrcv_get_conninfo,
+ .walrcv_get_senderinfo = libpqrcv_get_senderinfo,
+ .walrcv_identify_system = libpqrcv_identify_system,
+ .walrcv_server_version = libpqrcv_server_version,
+ .walrcv_readtimelinehistoryfile = libpqrcv_readtimelinehistoryfile,
+ .walrcv_startstreaming = libpqrcv_startstreaming,
+ .walrcv_endstreaming = libpqrcv_endstreaming,
+ .walrcv_receive = libpqrcv_receive,
+ .walrcv_send = libpqrcv_send,
+ .walrcv_create_slot = libpqrcv_create_slot,
+ .walrcv_get_backend_pid = libpqrcv_get_backend_pid,
+ .walrcv_exec = libpqrcv_exec,
+ .walrcv_disconnect = libpqrcv_disconnect
};
/* Prototypes for private functions */
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /