88 *
99 *
1010 * IDENTIFICATION
11- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.273 2002/07/29 22:14:11 tgl Exp $
11+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.274 2002/07/30 05:13:06 momjian Exp $
1212 *
1313 * NOTES
1414 * this is the "main" module of the postgres backend and
@@ -704,6 +704,9 @@ pg_exec_query_string(StringInfo query_string, /* string to execute */
704704 */
705705 MemoryContextSwitchTo (oldcontext );
706706
707+ if (StatementTimeout )
708+ enable_sig_alarm (StatementTimeout , true);
709+
707710 /*
708711 * Inner loop handles the individual queries generated from a
709712 * single parsetree by analysis and rewrite.
@@ -719,9 +722,6 @@ pg_exec_query_string(StringInfo query_string, /* string to execute */
719722 xact_started = true;
720723 }
721724
722- if (StatementTimeout )
723- enable_sig_alarm (StatementTimeout , true);
724-
725725 /*
726726 * If we got a cancel signal in analysis or prior command,
727727 * quit
@@ -796,8 +796,6 @@ pg_exec_query_string(StringInfo query_string, /* string to execute */
796796 ShowUsage ("EXECUTOR STATISTICS" );
797797 }
798798
799- disable_sig_alarm (true);
800-
801799 /*
802800 * In a query block, we want to increment the command counter
803801 * between queries so that the effects of early queries are
@@ -830,6 +828,8 @@ pg_exec_query_string(StringInfo query_string, /* string to execute */
830828 }
831829 } /* end loop over queries generated from a parsetree */
832830
831+ disable_sig_alarm (true);
832+
833833 /*
834834 * If this is the last parsetree of the query string, close down
835835 * transaction statement before reporting command-complete. This is
@@ -1693,7 +1693,7 @@ PostgresMain(int argc, char *argv[], const char *username)
16931693 if (!IsUnderPostmaster )
16941694 {
16951695 puts ("\nPOSTGRES backend interactive interface " );
1696- puts ("$Revision: 1.273 $ $Date: 2002/07/29 22:14:11 $\n" );
1696+ puts ("$Revision: 1.274 $ $Date: 2002/07/30 05:13:06 $\n" );
16971697 }
16981698
16991699 /*
0 commit comments