Skip to content

Commit 65cd829

Browse files
Modify some new and pre-existing messages for translatability.
1 parent 5ceb13c commit 65cd829

File tree

2 files changed

+26
-12
lines changed

2 files changed

+26
-12
lines changed

src/backend/postmaster/postmaster.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.603 2010/02/26 02:00:56 momjian Exp $
40+
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.604 2010/03/25 20:40:17 sriggs Exp $
4141
*
4242
* NOTES
4343
*
@@ -3340,10 +3340,17 @@ BackendInitialize(Port *port)
33403340
remote_host, remote_port);
33413341

33423342
if (Log_connections)
3343-
ereport(LOG,
3344-
(errmsg("connection received: host=%s%s%s",
3345-
remote_host, remote_port[0] ? " port=" : "",
3346-
remote_port)));
3343+
{
3344+
if (remote_port[0])
3345+
ereport(LOG,
3346+
(errmsg("connection received: host=%s port=%s",
3347+
remote_host,
3348+
remote_port)));
3349+
else
3350+
ereport(LOG,
3351+
(errmsg("connection received: host=%s",
3352+
remote_host)));
3353+
}
33473354

33483355
/*
33493356
* save remote_host and remote_port in port structure

src/backend/utils/init/postinit.c

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.207 2010/03/24 21:25:50 sriggs Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.208 2010/03/25 20:40:17 sriggs Exp $
1212
*
1313
*
1414
*-------------------------------------------------------------------------
@@ -221,12 +221,19 @@ PerformAuthentication(Port *port)
221221
* Log connection for streaming replication even if Log_connections disabled.
222222
*/
223223
if (am_walsender)
224-
ereport(LOG,
225-
(errmsg("replication connection authorized: user=%s host=%s%s%s",
226-
port->user_name,
227-
port->remote_host, port->remote_port[0] ? " port=" : "",
228-
port->remote_port)));
229-
224+
{
225+
if (port->remote_port[0])
226+
ereport(LOG,
227+
(errmsg("replication connection authorized: user=%s host=%s port=%s",
228+
port->user_name,
229+
port->remote_host,
230+
port->remote_port)));
231+
else
232+
ereport(LOG,
233+
(errmsg("replication connection authorized: user=%s host=%s",
234+
port->user_name,
235+
port->remote_host)));
236+
}
230237
else if (Log_connections)
231238
ereport(LOG,
232239
(errmsg("connection authorized: user=%s database=%s",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy