|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.500 2006/08/29 02:11:29 momjian Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.501 2006/08/29 02:32:41 momjian Exp $ |
12 | 12 | * |
13 | 13 | * NOTES |
14 | 14 | * this is the "main" module of the postgres backend and |
@@ -871,7 +871,9 @@ exec_simple_query(const char *query_string) |
871 | 871 | parsetree_list=pg_parse_query(query_string); |
872 | 872 |
|
873 | 873 | /* Log immediately if dictated by log_statement */ |
874 | | -was_logged=log_after_parse(parsetree_list,query_string,&prepare_string); |
| 874 | +if (log_statement!=LOGSTMT_NONE||log_duration|| |
| 875 | +log_min_duration_statement >=0) |
| 876 | +was_logged=log_after_parse(parsetree_list,query_string,&prepare_string); |
875 | 877 |
|
876 | 878 | /* |
877 | 879 | * Switch back to transaction context to enter the loop. |
|