|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.74 2003/11/29 19:51:57 pgsql Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.75 2004/03/05 00:21:41 momjian Exp $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -406,6 +406,17 @@ PortalRun(Portal portal, long count,
|
406 | 406 | if (completionTag)
|
407 | 407 | completionTag[0]='\0';
|
408 | 408 |
|
| 409 | +if (portal->strategy!=PORTAL_MULTI_QUERY) |
| 410 | +{ |
| 411 | +ereport(DEBUG3, |
| 412 | +(errmsg_internal("PortalRun"))); |
| 413 | +/* PORTAL_MULTI_QUERY logs its own stats per query */ |
| 414 | +if (log_executor_stats) |
| 415 | +ResetUsage(); |
| 416 | +} |
| 417 | + |
| 418 | +if (log_executor_stats&&portal->strategy!=PORTAL_MULTI_QUERY) |
| 419 | + |
409 | 420 | /*
|
410 | 421 | * Check for improper portal use, and mark portal active.
|
411 | 422 | */
|
@@ -500,6 +511,9 @@ PortalRun(Portal portal, long count,
|
500 | 511 | PortalContext=savePortalContext;
|
501 | 512 | QueryContext=saveQueryContext;
|
502 | 513 |
|
| 514 | +if (log_executor_stats&&portal->strategy!=PORTAL_MULTI_QUERY) |
| 515 | +ShowUsage("EXECUTOR STATISTICS"); |
| 516 | + |
503 | 517 | returnresult;
|
504 | 518 | }
|
505 | 519 |
|
|