mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
Only call log_after_parse() if necessary.
This commit is contained in:
parent
bc24d5b976
commit
f443258d4f
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.500 2006/08/29 02:11:29 momjian Exp $
|
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.501 2006/08/29 02:32:41 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* this is the "main" module of the postgres backend and
|
* this is the "main" module of the postgres backend and
|
||||||
@ -871,7 +871,9 @@ exec_simple_query(const char *query_string)
|
|||||||
parsetree_list = pg_parse_query(query_string);
|
parsetree_list = pg_parse_query(query_string);
|
||||||
|
|
||||||
/* Log immediately if dictated by log_statement */
|
/* Log immediately if dictated by log_statement */
|
||||||
was_logged = log_after_parse(parsetree_list, query_string, &prepare_string);
|
if (log_statement != LOGSTMT_NONE || log_duration ||
|
||||||
|
log_min_duration_statement >= 0)
|
||||||
|
was_logged = log_after_parse(parsetree_list, query_string, &prepare_string);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Switch back to transaction context to enter the loop.
|
* Switch back to transaction context to enter the loop.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user