*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.457 2005/08/11 21:11:45 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.458 2005/09/02 21:50:54 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
if (log_statement == LOGSTMT_ALL)
ereport(LOG,
- (errmsg("statement: PREPARE %s AS %s", stmt_name, query_string)));
+ (errmsg("statement: PREPARE %s AS %s",
+ (*stmt_name != '\0') ? stmt_name : "<unnamed>",
+ query_string)));
/*
* Start up a transaction command so we can run parse analysis etc.
if (log_statement == LOGSTMT_ALL)
/* We have the portal, so output the source query. */
ereport(LOG,
- (errmsg("statement: EXECUTE %s [PREPARE: %s]", portal_name,
+ (errmsg("statement: EXECUTE %s [PREPARE: %s]",
+ (*portal_name != '\0') ? portal_name : "<unnamed>",
portal->sourceText ? portal->sourceText : "")));
BeginCommand(portal->commandTag, dest);
(long) ((stop_t.tv_sec - start_t.tv_sec) * 1000 +
(stop_t.tv_usec - start_t.tv_usec) / 1000),
(long) (stop_t.tv_usec - start_t.tv_usec) % 1000,
- portal_name,
+ (*portal_name != '\0') ? portal_name : "<unnamed>",
portal->sourceText ? portal->sourceText : "")));
}