2
2
* Routines for handling of 'SET var TO',
3
3
* 'SHOW var' and 'RESET var' statements.
4
4
*
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 $
6
6
*
7
7
*/
8
8
16
16
#include "utils/builtins.h"
17
17
#include "optimizer/internal.h"
18
18
#include "access/xact.h"
19
+ #include "utils/tqual.h"
19
20
#ifdef MULTIBYTE
20
21
#include "mb/pg_wchar.h"
21
22
#endif
22
- #ifdef QUERY_LIMIT
23
- #include "executor/executor.h"
24
- #include "executor/execdefs.h"
25
- #endif
26
-
27
23
static bool show_date (void );
28
24
static bool reset_date (void );
29
25
static bool parse_date (const char * );
@@ -46,13 +42,6 @@ static bool show_XactIsoLevel(void);
46
42
static bool reset_XactIsoLevel (void );
47
43
static bool parse_XactIsoLevel (const char * );
48
44
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
-
56
45
extern Cost _cpu_page_wight_ ;
57
46
extern Cost _cpu_index_page_wight_ ;
58
47
extern bool _use_geqo_ ;
@@ -538,52 +527,6 @@ reset_timezone()
538
527
return TRUE;
539
528
} /* reset_timezone() */
540
529
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
-
587
530
/*-----------------------------------------------------------------------*/
588
531
589
532
struct VariableParsers
@@ -624,11 +567,6 @@ struct VariableParsers
624
567
{
625
568
"XactIsoLevel" , parse_XactIsoLevel , show_XactIsoLevel , reset_XactIsoLevel
626
569
},
627
- #ifdef QUERY_LIMIT
628
- {
629
- "query_limit" , parse_query_limit , show_query_limit , reset_query_limit
630
- },
631
- #endif
632
570
{
633
571
NULL , NULL , NULL , NULL
634
572
}
0 commit comments