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

Commit 7fe1f9a

Browse files
committed
Don't need gettext calls around debug messages.
1 parent d3a0c8d commit 7fe1f9a

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

src/interfaces/libpq/fe-connect.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.320 2005/08/23 21:02:03 momjian Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.321 2005/09/26 17:49:09 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1357,7 +1357,7 @@ PQconnectPoll(PGconn *conn)
13571357
{
13581358
/* Received error - probably protocol mismatch */
13591359
if (conn->Pfdebug)
1360-
fprintf(conn->Pfdebug, libpq_gettext("Postmaster reports error, attempting fallback to pre-7.0.\n"));
1360+
fprintf(conn->Pfdebug, "received error from server, attempting fallback to pre-7.0\n");
13611361
if (conn->sslmode[0] == 'r') /* "require" */
13621362
{
13631363
/* Require SSL, but server is too old */
@@ -2385,7 +2385,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
23852385
f = fopen(serviceFile, "r");
23862386
if (f == NULL)
23872387
{
2388-
printfPQExpBuffer(errorMessage, libpq_gettext("ERROR: Service file '%s' not found\n"),
2388+
printfPQExpBuffer(errorMessage, libpq_gettext("ERROR: service file \"%s\" not found\n"),
23892389
serviceFile);
23902390
return 1;
23912391
}
@@ -2398,7 +2398,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
23982398
{
23992399
fclose(f);
24002400
printfPQExpBuffer(errorMessage,
2401-
libpq_gettext("ERROR: line %d too long in service file '%s'\n"),
2401+
libpq_gettext("ERROR: line %d too long in service file \"%s\"\n"),
24022402
linenr,
24032403
serviceFile);
24042404
return 2;
@@ -2449,7 +2449,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
24492449
if (val == NULL)
24502450
{
24512451
printfPQExpBuffer(errorMessage,
2452-
libpq_gettext("ERROR: syntax error in service file '%s', line %d\n"),
2452+
libpq_gettext("ERROR: syntax error in service file \"%s\", line %d\n"),
24532453
serviceFile,
24542454
linenr);
24552455
fclose(f);
@@ -2476,7 +2476,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
24762476
if (!found_keyword)
24772477
{
24782478
printfPQExpBuffer(errorMessage,
2479-
libpq_gettext("ERROR: syntax error in service file '%s', line %d\n"),
2479+
libpq_gettext("ERROR: syntax error in service file \"%s\", line %d\n"),
24802480
serviceFile,
24812481
linenr);
24822482
fclose(f);
@@ -3138,7 +3138,7 @@ PasswordFromFile(char *hostname, char *port, char *dbname, char *username)
31383138
if (!S_ISREG(stat_buf.st_mode))
31393139
{
31403140
fprintf(stderr,
3141-
libpq_gettext("WARNING: Password file %s is not a plain file.\n"),
3141+
libpq_gettext("WARNING: password file \"%s\" is not a plain file\n"),
31423142
pgpassfile);
31433143
free(pgpassfile);
31443144
return NULL;
@@ -3148,7 +3148,7 @@ PasswordFromFile(char *hostname, char *port, char *dbname, char *username)
31483148
if (stat_buf.st_mode & (S_IRWXG | S_IRWXO))
31493149
{
31503150
fprintf(stderr,
3151-
libpq_gettext("WARNING: Password file %s has world or group read access; permission should be u=rw (0600)\n"),
3151+
libpq_gettext("WARNING: password file \"%s\" has world or group read access; permission should be u=rw (0600)\n"),
31523152
pgpassfile);
31533153
return NULL;
31543154
}

src/interfaces/libpq/fe-misc.c

+11-11
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* Portions Copyright (c) 1994, Regents of the University of California
2424
*
2525
* IDENTIFICATION
26-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.120 2005/09/24 17:53:28 tgl Exp $
26+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.121 2005/09/26 17:49:09 petere Exp $
2727
*
2828
*-------------------------------------------------------------------------
2929
*/
@@ -85,7 +85,7 @@ pqGetc(char *result, PGconn *conn)
8585
*result = conn->inBuffer[conn->inCursor++];
8686

8787
if (conn->Pfdebug)
88-
fprintf(conn->Pfdebug, libpq_gettext("From backend> %c\n"), *result);
88+
fprintf(conn->Pfdebug, "From backend> %c\n", *result);
8989

9090
return 0;
9191
}
@@ -101,7 +101,7 @@ pqPutc(char c, PGconn *conn)
101101
return EOF;
102102

103103
if (conn->Pfdebug)
104-
fprintf(conn->Pfdebug, libpq_gettext("To backend> %c\n"), c);
104+
fprintf(conn->Pfdebug, "To backend> %c\n", c);
105105

106106
return 0;
107107
}
@@ -137,7 +137,7 @@ pqGets(PQExpBuffer buf, PGconn *conn)
137137
conn->inCursor = ++inCursor;
138138

139139
if (conn->Pfdebug)
140-
fprintf(conn->Pfdebug, libpq_gettext("From backend> \"%s\"\n"),
140+
fprintf(conn->Pfdebug, "From backend> \"%s\"\n",
141141
buf->data);
142142

143143
return 0;
@@ -154,7 +154,7 @@ pqPuts(const char *s, PGconn *conn)
154154
return EOF;
155155

156156
if (conn->Pfdebug)
157-
fprintf(conn->Pfdebug, libpq_gettext("To backend> '%s'\n"), s);
157+
fprintf(conn->Pfdebug, "To backend> \"%s\"\n", s);
158158

159159
return 0;
160160
}
@@ -175,7 +175,7 @@ pqGetnchar(char *s, size_t len, PGconn *conn)
175175
conn->inCursor += len;
176176

177177
if (conn->Pfdebug)
178-
fprintf(conn->Pfdebug, libpq_gettext("From backend (%lu)> %.*s\n"),
178+
fprintf(conn->Pfdebug, "From backend (%lu)> %.*s\n",
179179
(unsigned long) len, (int) len, s);
180180

181181
return 0;
@@ -192,7 +192,7 @@ pqPutnchar(const char *s, size_t len, PGconn *conn)
192192
return EOF;
193193

194194
if (conn->Pfdebug)
195-
fprintf(conn->Pfdebug, libpq_gettext("To backend> %.*s\n"), (int) len, s);
195+
fprintf(conn->Pfdebug, "To backend> %.*s\n", (int) len, s);
196196

197197
return 0;
198198
}
@@ -232,7 +232,7 @@ pqGetInt(int *result, size_t bytes, PGconn *conn)
232232
}
233233

234234
if (conn->Pfdebug)
235-
fprintf(conn->Pfdebug, libpq_gettext("From backend (#%lu)> %d\n"), (unsigned long) bytes, *result);
235+
fprintf(conn->Pfdebug, "From backend (#%lu)> %d\n", (unsigned long) bytes, *result);
236236

237237
return 0;
238238
}
@@ -268,7 +268,7 @@ pqPutInt(int value, size_t bytes, PGconn *conn)
268268
}
269269

270270
if (conn->Pfdebug)
271-
fprintf(conn->Pfdebug, libpq_gettext("To backend (%lu#)> %d\n"), (unsigned long) bytes, value);
271+
fprintf(conn->Pfdebug, "To backend (%lu#)> %d\n", (unsigned long) bytes, value);
272272

273273
return 0;
274274
}
@@ -456,7 +456,7 @@ pqPutMsgStart(char msg_type, bool force_len, PGconn *conn)
456456
/* length word, if needed, will be filled in by pqPutMsgEnd */
457457

458458
if (conn->Pfdebug)
459-
fprintf(conn->Pfdebug, libpq_gettext("To backend> Msg %c\n"),
459+
fprintf(conn->Pfdebug, "To backend> Msg %c\n",
460460
msg_type ? msg_type : ' ');
461461

462462
return 0;
@@ -494,7 +494,7 @@ int
494494
pqPutMsgEnd(PGconn *conn)
495495
{
496496
if (conn->Pfdebug)
497-
fprintf(conn->Pfdebug, libpq_gettext("To backend> Msg complete, length %u\n"),
497+
fprintf(conn->Pfdebug, "To backend> Msg complete, length %u\n",
498498
conn->outMsgEnd - conn->outCount);
499499

500500
/* Fill in length word if needed */

0 commit comments

Comments
 (0)