22 * Routines for handling of 'SET var TO',
33 *'SHOW var' and 'RESET var' statements.
44 *
5- * $Id: variable.c,v 1.20 1999/05/25 16:08:28 momjian Exp $
5+ * $Id: variable.c,v 1.21 1999/06/17 15:15:48 momjian Exp $
66 *
77 */
88
1616#include "utils/builtins.h"
1717#include "optimizer/internal.h"
1818#include "access/xact.h"
19+ #include "utils/tqual.h"
1920#ifdef MULTIBYTE
2021#include "mb/pg_wchar.h"
2122#endif
22- #ifdef QUERY_LIMIT
23- #include "executor/executor.h"
24- #include "executor/execdefs.h"
25- #endif
26-
2723static bool show_date (void );
2824static bool reset_date (void );
2925static bool parse_date (const char * );
@@ -46,13 +42,6 @@ static bool show_XactIsoLevel(void);
4642static bool reset_XactIsoLevel (void );
4743static bool parse_XactIsoLevel (const char * );
4844
49- #ifdef QUERY_LIMIT
50- static bool show_query_limit (void );
51- static bool reset_query_limit (void );
52- static bool parse_query_limit (const char * );
53-
54- #endif
55-
5645extern Cost _cpu_page_wight_ ;
5746extern Cost _cpu_index_page_wight_ ;
5847extern bool _use_geqo_ ;
@@ -538,52 +527,6 @@ reset_timezone()
538527return TRUE;
539528}/* reset_timezone() */
540529
541- /*
542- *
543- * Query_limit
544- *
545- */
546- #ifdef QUERY_LIMIT
547- static bool
548- parse_query_limit (const char * value )
549- {
550- int32 limit ;
551-
552- if (value == NULL )
553- {
554- reset_query_limit ();
555- return (TRUE);
556- }
557- /* why is pg_atoi's arg not declared "const char *" ? */
558- limit = pg_atoi ((char * )value ,sizeof (int32 ),'\0' );
559- if (limit <=-1 )
560- elog (ERROR ,"Bad value for # of query limit (%s)" ,value );
561- ExecutorLimit (limit );
562- return (TRUE);
563- }
564-
565- static bool
566- show_query_limit (void )
567- {
568- int limit ;
569-
570- limit = ExecutorGetLimit ();
571- if (limit == ALL_TUPLES )
572- elog (NOTICE ,"No query limit is set" );
573- else
574- elog (NOTICE ,"query limit is %d" ,limit );
575- return (TRUE);
576- }
577-
578- static bool
579- reset_query_limit (void )
580- {
581- ExecutorLimit (ALL_TUPLES );
582- return (TRUE);
583- }
584-
585- #endif
586-
587530/*-----------------------------------------------------------------------*/
588531
589532struct VariableParsers
@@ -624,11 +567,6 @@ struct VariableParsers
624567{
625568"XactIsoLevel" ,parse_XactIsoLevel ,show_XactIsoLevel ,reset_XactIsoLevel
626569},
627- #ifdef QUERY_LIMIT
628- {
629- "query_limit" ,parse_query_limit ,show_query_limit ,reset_query_limit
630- },
631- #endif
632570{
633571NULL ,NULL ,NULL ,NULL
634572}