Commit 7fe1f9a2 authored by Peter Eisentraut's avatar Peter Eisentraut

Don't need gettext calls around debug messages.

parent d3a0c8dc
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.320 2005/08/23 21:02:03 momjian Exp $ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.321 2005/09/26 17:49:09 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1357,7 +1357,7 @@ keep_going: /* We will come back to here until there ...@@ -1357,7 +1357,7 @@ keep_going: /* We will come back to here until there
{ {
/* Received error - probably protocol mismatch */ /* Received error - probably protocol mismatch */
if (conn->Pfdebug) if (conn->Pfdebug)
fprintf(conn->Pfdebug, libpq_gettext("Postmaster reports error, attempting fallback to pre-7.0.\n")); fprintf(conn->Pfdebug, "received error from server, attempting fallback to pre-7.0\n");
if (conn->sslmode[0] == 'r') /* "require" */ if (conn->sslmode[0] == 'r') /* "require" */
{ {
/* Require SSL, but server is too old */ /* Require SSL, but server is too old */
...@@ -2385,7 +2385,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage) ...@@ -2385,7 +2385,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
f = fopen(serviceFile, "r"); f = fopen(serviceFile, "r");
if (f == NULL) if (f == NULL)
{ {
printfPQExpBuffer(errorMessage, libpq_gettext("ERROR: Service file '%s' not found\n"), printfPQExpBuffer(errorMessage, libpq_gettext("ERROR: service file \"%s\" not found\n"),
serviceFile); serviceFile);
return 1; return 1;
} }
...@@ -2398,7 +2398,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage) ...@@ -2398,7 +2398,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
{ {
fclose(f); fclose(f);
printfPQExpBuffer(errorMessage, printfPQExpBuffer(errorMessage,
libpq_gettext("ERROR: line %d too long in service file '%s'\n"), libpq_gettext("ERROR: line %d too long in service file \"%s\"\n"),
linenr, linenr,
serviceFile); serviceFile);
return 2; return 2;
...@@ -2449,7 +2449,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage) ...@@ -2449,7 +2449,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
if (val == NULL) if (val == NULL)
{ {
printfPQExpBuffer(errorMessage, printfPQExpBuffer(errorMessage,
libpq_gettext("ERROR: syntax error in service file '%s', line %d\n"), libpq_gettext("ERROR: syntax error in service file \"%s\", line %d\n"),
serviceFile, serviceFile,
linenr); linenr);
fclose(f); fclose(f);
...@@ -2476,7 +2476,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage) ...@@ -2476,7 +2476,7 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
if (!found_keyword) if (!found_keyword)
{ {
printfPQExpBuffer(errorMessage, printfPQExpBuffer(errorMessage,
libpq_gettext("ERROR: syntax error in service file '%s', line %d\n"), libpq_gettext("ERROR: syntax error in service file \"%s\", line %d\n"),
serviceFile, serviceFile,
linenr); linenr);
fclose(f); fclose(f);
...@@ -3138,7 +3138,7 @@ PasswordFromFile(char *hostname, char *port, char *dbname, char *username) ...@@ -3138,7 +3138,7 @@ PasswordFromFile(char *hostname, char *port, char *dbname, char *username)
if (!S_ISREG(stat_buf.st_mode)) if (!S_ISREG(stat_buf.st_mode))
{ {
fprintf(stderr, fprintf(stderr,
libpq_gettext("WARNING: Password file %s is not a plain file.\n"), libpq_gettext("WARNING: password file \"%s\" is not a plain file\n"),
pgpassfile); pgpassfile);
free(pgpassfile); free(pgpassfile);
return NULL; return NULL;
...@@ -3148,7 +3148,7 @@ PasswordFromFile(char *hostname, char *port, char *dbname, char *username) ...@@ -3148,7 +3148,7 @@ PasswordFromFile(char *hostname, char *port, char *dbname, char *username)
if (stat_buf.st_mode & (S_IRWXG | S_IRWXO)) if (stat_buf.st_mode & (S_IRWXG | S_IRWXO))
{ {
fprintf(stderr, fprintf(stderr,
libpq_gettext("WARNING: Password file %s has world or group read access; permission should be u=rw (0600)\n"), libpq_gettext("WARNING: password file \"%s\" has world or group read access; permission should be u=rw (0600)\n"),
pgpassfile); pgpassfile);
return NULL; return NULL;
} }
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.120 2005/09/24 17:53:28 tgl Exp $ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-misc.c,v 1.121 2005/09/26 17:49:09 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -85,7 +85,7 @@ pqGetc(char *result, PGconn *conn) ...@@ -85,7 +85,7 @@ pqGetc(char *result, PGconn *conn)
*result = conn->inBuffer[conn->inCursor++]; *result = conn->inBuffer[conn->inCursor++];
if (conn->Pfdebug) if (conn->Pfdebug)
fprintf(conn->Pfdebug, libpq_gettext("From backend> %c\n"), *result); fprintf(conn->Pfdebug, "From backend> %c\n", *result);
return 0; return 0;
} }
...@@ -101,7 +101,7 @@ pqPutc(char c, PGconn *conn) ...@@ -101,7 +101,7 @@ pqPutc(char c, PGconn *conn)
return EOF; return EOF;
if (conn->Pfdebug) if (conn->Pfdebug)
fprintf(conn->Pfdebug, libpq_gettext("To backend> %c\n"), c); fprintf(conn->Pfdebug, "To backend> %c\n", c);
return 0; return 0;
} }
...@@ -137,7 +137,7 @@ pqGets(PQExpBuffer buf, PGconn *conn) ...@@ -137,7 +137,7 @@ pqGets(PQExpBuffer buf, PGconn *conn)
conn->inCursor = ++inCursor; conn->inCursor = ++inCursor;
if (conn->Pfdebug) if (conn->Pfdebug)
fprintf(conn->Pfdebug, libpq_gettext("From backend> \"%s\"\n"), fprintf(conn->Pfdebug, "From backend> \"%s\"\n",
buf->data); buf->data);
return 0; return 0;
...@@ -154,7 +154,7 @@ pqPuts(const char *s, PGconn *conn) ...@@ -154,7 +154,7 @@ pqPuts(const char *s, PGconn *conn)
return EOF; return EOF;
if (conn->Pfdebug) if (conn->Pfdebug)
fprintf(conn->Pfdebug, libpq_gettext("To backend> '%s'\n"), s); fprintf(conn->Pfdebug, "To backend> \"%s\"\n", s);
return 0; return 0;
} }
...@@ -175,7 +175,7 @@ pqGetnchar(char *s, size_t len, PGconn *conn) ...@@ -175,7 +175,7 @@ pqGetnchar(char *s, size_t len, PGconn *conn)
conn->inCursor += len; conn->inCursor += len;
if (conn->Pfdebug) if (conn->Pfdebug)
fprintf(conn->Pfdebug, libpq_gettext("From backend (%lu)> %.*s\n"), fprintf(conn->Pfdebug, "From backend (%lu)> %.*s\n",
(unsigned long) len, (int) len, s); (unsigned long) len, (int) len, s);
return 0; return 0;
...@@ -192,7 +192,7 @@ pqPutnchar(const char *s, size_t len, PGconn *conn) ...@@ -192,7 +192,7 @@ pqPutnchar(const char *s, size_t len, PGconn *conn)
return EOF; return EOF;
if (conn->Pfdebug) if (conn->Pfdebug)
fprintf(conn->Pfdebug, libpq_gettext("To backend> %.*s\n"), (int) len, s); fprintf(conn->Pfdebug, "To backend> %.*s\n", (int) len, s);
return 0; return 0;
} }
...@@ -232,7 +232,7 @@ pqGetInt(int *result, size_t bytes, PGconn *conn) ...@@ -232,7 +232,7 @@ pqGetInt(int *result, size_t bytes, PGconn *conn)
} }
if (conn->Pfdebug) if (conn->Pfdebug)
fprintf(conn->Pfdebug, libpq_gettext("From backend (#%lu)> %d\n"), (unsigned long) bytes, *result); fprintf(conn->Pfdebug, "From backend (#%lu)> %d\n", (unsigned long) bytes, *result);
return 0; return 0;
} }
...@@ -268,7 +268,7 @@ pqPutInt(int value, size_t bytes, PGconn *conn) ...@@ -268,7 +268,7 @@ pqPutInt(int value, size_t bytes, PGconn *conn)
} }
if (conn->Pfdebug) if (conn->Pfdebug)
fprintf(conn->Pfdebug, libpq_gettext("To backend (%lu#)> %d\n"), (unsigned long) bytes, value); fprintf(conn->Pfdebug, "To backend (%lu#)> %d\n", (unsigned long) bytes, value);
return 0; return 0;
} }
...@@ -456,7 +456,7 @@ pqPutMsgStart(char msg_type, bool force_len, PGconn *conn) ...@@ -456,7 +456,7 @@ pqPutMsgStart(char msg_type, bool force_len, PGconn *conn)
/* length word, if needed, will be filled in by pqPutMsgEnd */ /* length word, if needed, will be filled in by pqPutMsgEnd */
if (conn->Pfdebug) if (conn->Pfdebug)
fprintf(conn->Pfdebug, libpq_gettext("To backend> Msg %c\n"), fprintf(conn->Pfdebug, "To backend> Msg %c\n",
msg_type ? msg_type : ' '); msg_type ? msg_type : ' ');
return 0; return 0;
...@@ -494,7 +494,7 @@ int ...@@ -494,7 +494,7 @@ int
pqPutMsgEnd(PGconn *conn) pqPutMsgEnd(PGconn *conn)
{ {
if (conn->Pfdebug) if (conn->Pfdebug)
fprintf(conn->Pfdebug, libpq_gettext("To backend> Msg complete, length %u\n"), fprintf(conn->Pfdebug, "To backend> Msg complete, length %u\n",
conn->outMsgEnd - conn->outCount); conn->outMsgEnd - conn->outCount);
/* Fill in length word if needed */ /* Fill in length word if needed */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment