Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf443258

Browse files
committed
Only call log_after_parse() if necessary.
1 parentbc24d5b commitf443258

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/backend/tcop/postgres.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* 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 $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -871,7 +871,9 @@ exec_simple_query(const char *query_string)
871871
parsetree_list=pg_parse_query(query_string);
872872

873873
/* 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);
875877

876878
/*
877879
* Switch back to transaction context to enter the loop.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp