8
8
*
9
9
*
10
10
* 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 $
12
12
*
13
13
* NOTES
14
14
* this is the "main" module of the postgres backend and
@@ -704,6 +704,9 @@ pg_exec_query_string(StringInfo query_string, /* string to execute */
704
704
*/
705
705
MemoryContextSwitchTo (oldcontext );
706
706
707
+ if (StatementTimeout )
708
+ enable_sig_alarm (StatementTimeout , true);
709
+
707
710
/*
708
711
* Inner loop handles the individual queries generated from a
709
712
* single parsetree by analysis and rewrite.
@@ -719,9 +722,6 @@ pg_exec_query_string(StringInfo query_string, /* string to execute */
719
722
xact_started = true;
720
723
}
721
724
722
- if (StatementTimeout )
723
- enable_sig_alarm (StatementTimeout , true);
724
-
725
725
/*
726
726
* If we got a cancel signal in analysis or prior command,
727
727
* quit
@@ -796,8 +796,6 @@ pg_exec_query_string(StringInfo query_string, /* string to execute */
796
796
ShowUsage ("EXECUTOR STATISTICS" );
797
797
}
798
798
799
- disable_sig_alarm (true);
800
-
801
799
/*
802
800
* In a query block, we want to increment the command counter
803
801
* between queries so that the effects of early queries are
@@ -830,6 +828,8 @@ pg_exec_query_string(StringInfo query_string, /* string to execute */
830
828
}
831
829
} /* end loop over queries generated from a parsetree */
832
830
831
+ disable_sig_alarm (true);
832
+
833
833
/*
834
834
* If this is the last parsetree of the query string, close down
835
835
* transaction statement before reporting command-complete. This is
@@ -1693,7 +1693,7 @@ PostgresMain(int argc, char *argv[], const char *username)
1693
1693
if (!IsUnderPostmaster )
1694
1694
{
1695
1695
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" );
1697
1697
}
1698
1698
1699
1699
/*
0 commit comments