Skip to content

Commit c86be11

Browse files
committed
Mmark client-side prepare/bind/execute statements with "[client]" so
they can be easily distinguished from SQL commands.
1 parent 12af9cd commit c86be11

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/backend/tcop/postgres.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.471 2005/12/14 17:06:27 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.472 2005/12/30 22:55:20 momjian Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -1146,7 +1146,7 @@ exec_parse_message(const char *query_string, /* string to execute */
11461146

11471147
if (log_statement == LOGSTMT_ALL)
11481148
ereport(LOG,
1149-
(errmsg("statement: PREPARE %s AS %s",
1149+
(errmsg("statement: [client] PREPARE %s AS %s",
11501150
(*stmt_name != '\0') ? stmt_name : "<unnamed>",
11511151
query_string)));
11521152

@@ -1449,7 +1449,7 @@ exec_bind_message(StringInfo input_message)
14491449
/* We need to output the parameter values someday */
14501450
if (log_statement == LOGSTMT_ALL)
14511451
ereport(LOG,
1452-
(errmsg("statement: <BIND> %s", portal_name)));
1452+
(errmsg("statement: [client] <BIND> %s", portal_name)));
14531453

14541454
/*
14551455
* Fetch parameters, if any, and store in the portal's memory context.
@@ -1712,7 +1712,7 @@ exec_execute_message(const char *portal_name, long max_rows)
17121712
if (log_statement == LOGSTMT_ALL)
17131713
/* We have the portal, so output the source query. */
17141714
ereport(LOG,
1715-
(errmsg("statement: %sEXECUTE %s [PREPARE: %s]",
1715+
(errmsg("statement: [client] %sEXECUTE %s [PREPARE: %s]",
17161716
(execute_is_fetch) ? "FETCH from " : "",
17171717
(*portal_name != '\0') ? portal_name : "<unnamed>",
17181718
portal->sourceText ? portal->sourceText : "")));
@@ -1821,7 +1821,7 @@ exec_execute_message(const char *portal_name, long max_rows)
18211821
(save_log_min_duration_statement > 0 &&
18221822
usecs >= save_log_min_duration_statement * 1000))
18231823
ereport(LOG,
1824-
(errmsg("duration: %ld.%03ld ms statement: %sEXECUTE %s [PREPARE: %s]",
1824+
(errmsg("duration: %ld.%03ld ms statement: [client] %sEXECUTE %s [PREPARE: %s]",
18251825
(long) ((stop_t.tv_sec - start_t.tv_sec) * 1000 +
18261826
(stop_t.tv_usec - start_t.tv_usec) / 1000),
18271827
(long) (stop_t.tv_usec - start_t.tv_usec) % 1000,

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