8
8
*
9
9
*
10
10
* 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 $
12
12
*
13
13
* NOTES
14
14
* 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,
498
498
if (IsA (parsetree ,PrepareStmt ))
499
499
parsetree = (Node * ) (((PrepareStmt * )parsetree )-> query );
500
500
501
- if (IsA (parsetree ,SelectStmt ))
501
+ if (IsA (parsetree ,SelectStmt )&&
502
+ ((SelectStmt * )parsetree )-> into == NULL )
502
503
continue ;/* optimization for frequent command */
503
504
504
505
if (log_statement == LOGSTMT_MOD &&
@@ -514,6 +515,7 @@ log_after_parse(List *raw_parsetree_list, const char *query_string,
514
515
if ((log_statement == LOGSTMT_MOD ||
515
516
log_statement == LOGSTMT_DDL )&&
516
517
(strncmp (commandTag ,"CREATE " ,strlen ("CREATE " ))== 0 ||
518
+ IsA (parsetree ,SelectStmt )|| /* SELECT INTO, CREATE AS */
517
519
strncmp (commandTag ,"ALTER " ,strlen ("ALTER " ))== 0 ||
518
520
strncmp (commandTag ,"DROP " ,strlen ("DROP " ))== 0 ||
519
521
IsA (parsetree ,GrantStmt )|| /* GRANT or REVOKE */