|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * 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 $ |
12 | 12 | * |
13 | 13 | * NOTES |
14 | 14 | * this is the "main" module of the postgres backend and |
@@ -1164,7 +1164,9 @@ exec_parse_message(const char *query_string,/* string to execute */ |
1164 | 1164 |
|
1165 | 1165 | if (log_statement==LOGSTMT_ALL) |
1166 | 1166 | 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))); |
1168 | 1170 |
|
1169 | 1171 | /* |
1170 | 1172 | * 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) |
1732 | 1734 | if (log_statement==LOGSTMT_ALL) |
1733 | 1735 | /* We have the portal, so output the source query. */ |
1734 | 1736 | 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>", |
1736 | 1739 | portal->sourceText ?portal->sourceText :""))); |
1737 | 1740 |
|
1738 | 1741 | BeginCommand(portal->commandTag,dest); |
@@ -1867,7 +1870,7 @@ exec_execute_message(const char *portal_name, long max_rows) |
1867 | 1870 | (long) ((stop_t.tv_sec-start_t.tv_sec)*1000+ |
1868 | 1871 | (stop_t.tv_usec-start_t.tv_usec) /1000), |
1869 | 1872 | (long) (stop_t.tv_usec-start_t.tv_usec) %1000, |
1870 | | -portal_name, |
| 1873 | +(*portal_name!='\0') ?portal_name :"<unnamed>", |
1871 | 1874 | portal->sourceText ?portal->sourceText :""))); |
1872 | 1875 | } |
1873 | 1876 |
|
|