Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit11b5c55

Browse files
committed
Add log display label for unnamed server-side portals.
1 parent0802078 commit11b5c55

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎src/backend/tcop/postgres.c

Lines changed: 7 additions & 4 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.457 2005/08/11 21:11:45 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.458 2005/09/02 21:50:54 momjian Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -1164,7 +1164,9 @@ exec_parse_message(const char *query_string,/* string to execute */
11641164

11651165
if (log_statement==LOGSTMT_ALL)
11661166
ereport(LOG,
1167-
(errmsg("statement: PREPARE %s AS %s",stmt_name,query_string)));
1167+
(errmsg("statement: PREPARE %s AS %s",
1168+
(*stmt_name!='\0') ?stmt_name :"<unnamed>",
1169+
query_string)));
11681170

11691171
/*
11701172
* Start up a transaction command so we can run parse analysis etc.
@@ -1732,7 +1734,8 @@ exec_execute_message(const char *portal_name, long max_rows)
17321734
if (log_statement==LOGSTMT_ALL)
17331735
/* We have the portal, so output the source query. */
17341736
ereport(LOG,
1735-
(errmsg("statement: EXECUTE %s [PREPARE: %s]",portal_name,
1737+
(errmsg("statement: EXECUTE %s [PREPARE: %s]",
1738+
(*portal_name!='\0') ?portal_name :"<unnamed>",
17361739
portal->sourceText ?portal->sourceText :"")));
17371740

17381741
BeginCommand(portal->commandTag,dest);
@@ -1867,7 +1870,7 @@ exec_execute_message(const char *portal_name, long max_rows)
18671870
(long) ((stop_t.tv_sec-start_t.tv_sec)*1000+
18681871
(stop_t.tv_usec-start_t.tv_usec) /1000),
18691872
(long) (stop_t.tv_usec-start_t.tv_usec) %1000,
1870-
portal_name,
1873+
(*portal_name!='\0') ?portal_name :"<unnamed>",
18711874
portal->sourceText ?portal->sourceText :"")));
18721875
}
18731876

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp