88 *
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.444 2005/05/24 04:18:04 momjian Exp $
11+ * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.445 2005/06/01 23:27:03 momjian Exp $
1212 *
1313 * NOTES
1414 * this is the "main" module of the postgres backend and
@@ -498,7 +498,8 @@ log_after_parse(List *raw_parsetree_list, const char *query_string,
498498if (IsA (parsetree ,PrepareStmt ))
499499parsetree = (Node * ) (((PrepareStmt * )parsetree )-> query );
500500
501- if (IsA (parsetree ,SelectStmt ))
501+ if (IsA (parsetree ,SelectStmt )&&
502+ ((SelectStmt * )parsetree )-> into == NULL )
502503continue ;/* optimization for frequent command */
503504
504505if (log_statement == LOGSTMT_MOD &&
@@ -514,6 +515,7 @@ log_after_parse(List *raw_parsetree_list, const char *query_string,
514515if ((log_statement == LOGSTMT_MOD ||
515516log_statement == LOGSTMT_DDL )&&
516517(strncmp (commandTag ,"CREATE " ,strlen ("CREATE " ))== 0 ||
518+ IsA (parsetree ,SelectStmt )|| /* SELECT INTO, CREATE AS */
517519strncmp (commandTag ,"ALTER " ,strlen ("ALTER " ))== 0 ||
518520strncmp (commandTag ,"DROP " ,strlen ("DROP " ))== 0 ||
519521IsA (parsetree ,GrantStmt )|| /* GRANT or REVOKE */