Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4c65382

Browse files
committed
Remove QUERY_LIMIT and documenation on same. Change _ALIGN to TYPEALIGN
for Irix.
1 parent 0c1ec67 commit 4c65382

File tree

11 files changed

+18
-163
lines changed

11 files changed

+18
-163
lines changed

doc/src/sgml/libpq++.sgml

-6
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,6 @@
182182
sets the default cost for indexed searches for the optimizer.
183183
</para>
184184
</listitem>
185-
<listitem>
186-
<para>
187-
<envar>PGQUERY_LIMIT</envar>
188-
sets the maximum number of rows returned by a query.
189-
</para>
190-
</listitem>
191185
</itemizedlist>
192186
</para>
193187

doc/src/sgml/libpq.sgml

-6
Original file line numberDiff line numberDiff line change
@@ -1521,12 +1521,6 @@ sets the default cost for heap searches for the optimizer.
15211521
sets the default cost for indexed searches for the optimizer.
15221522
</Para>
15231523
</ListItem>
1524-
<ListItem>
1525-
<Para>
1526-
<Acronym>PGQUERY_LIMIT</Acronym>
1527-
sets the maximum number of rows returned by a query.
1528-
</Para>
1529-
</ListItem>
15301524
</ItemizedList>
15311525
</Para>
15321526

doc/src/sgml/ref/set.sgml

-37
Original file line numberDiff line numberDiff line change
@@ -601,43 +601,6 @@ SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZED }
601601
</listitem>
602602
</varlistentry>
603603

604-
<varlistentry>
605-
<term>
606-
QUERY_LIMIT
607-
</term>
608-
<listitem>
609-
<para>
610-
Sets the maximum number of rows returned by a query.
611-
By default, there is no limit to the number of rows
612-
returned by a query.
613-
614-
<variablelist>
615-
<varlistentry>
616-
<term>
617-
<replaceable class="parameter">#</replaceable>
618-
</term>
619-
<listitem>
620-
<para>
621-
Sets the maximum number of rows returned by a
622-
query to <replaceable class="parameter">#</replaceable>.
623-
</para>
624-
</listitem>
625-
</varlistentry>
626-
<varlistentry>
627-
<term>
628-
DEFAULT
629-
</term>
630-
<listitem>
631-
<para>
632-
Sets the maximum number of rows returned by a query to be unlimited.
633-
</para>
634-
</listitem>
635-
</varlistentry>
636-
</variablelist>
637-
</para>
638-
</listitem>
639-
</varlistentry>
640-
641604
</variablelist>
642605
</para>
643606
</refsect2>

src/backend/commands/variable.c

+2-64
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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

@@ -16,14 +16,10 @@
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-
2723
static bool show_date(void);
2824
static bool reset_date(void);
2925
static bool parse_date(const char *);
@@ -46,13 +42,6 @@ static bool show_XactIsoLevel(void);
4642
static bool reset_XactIsoLevel(void);
4743
static 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-
5645
extern Cost _cpu_page_wight_;
5746
extern Cost _cpu_index_page_wight_;
5847
extern bool _use_geqo_;
@@ -538,52 +527,6 @@ reset_timezone()
538527
return 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

589532
struct 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
{
633571
NULL, NULL, NULL, NULL
634572
}

src/backend/executor/execMain.c

+1-21
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
*
2828
* IDENTIFICATION
29-
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.87 1999/06/09 12:23:42 vadim Exp $
29+
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.88 1999/06/17 15:15:49 momjian Exp $
3030
*
3131
*-------------------------------------------------------------------------
3232
*/
@@ -88,26 +88,6 @@ static TupleTableSlot *EvalPlanQualNext(EState *estate);
8888

8989
/* end of local decls */
9090

91-
#ifdef QUERY_LIMIT
92-
static int queryLimit = ALL_TUPLES;
93-
94-
#undef ALL_TUPLES
95-
#define ALL_TUPLES queryLimit
96-
97-
int
98-
ExecutorLimit(int limit)
99-
{
100-
return queryLimit = limit;
101-
}
102-
103-
int
104-
ExecutorGetLimit()
105-
{
106-
return queryLimit;
107-
}
108-
109-
#endif
110-
11191
/* ----------------------------------------------------------------
11292
* ExecutorStart
11393
*

src/bin/psql/psqlHelp.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: psqlHelp.h,v 1.70 1999/06/04 04:28:53 momjian Exp $
8+
* $Id: psqlHelp.h,v 1.71 1999/06/17 15:15:51 momjian Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -296,7 +296,7 @@ static struct _helpStruct QL_HELP[] = {
296296
{"reset",
297297
"set run-time environment back to default",
298298
"\
299-
\tRESET DATESTYLE|COST_HEAP|COST_INDEX|GEQO|KSQO|QUERY_LIMIT|\n\
299+
\tRESET DATESTYLE|COST_HEAP|COST_INDEX|GEQO|KSQO|\n\
300300
TIMEZONE|XACTISOLEVEL|CLIENT_ENCODING|SERVER_ENCODING"},
301301
{"revoke",
302302
"revoke access control from a user or group",
@@ -329,7 +329,6 @@ TIMEZONE|XACTISOLEVEL|CLIENT_ENCODING|SERVER_ENCODING"},
329329
\tSET COST_INDEX TO #\n\
330330
\tSET GEQO TO 'ON[=#]'|'OFF'\n\
331331
\tSET KSQO TO 'ON'|'OFF'\n\
332-
\tSET QUERY_LIMIT TO #\n\
333332
\tSET TIMEZONE TO 'value'\n\
334333
\tSET TRANSACTION ISOLATION LEVEL 'SERIALIZABLE'|'READ COMMITTED'\n\
335334
\tSET CLIENT_ENCODING|NAMES TO 'EUC_JP'|'SJIS'|'EUC_CN'|'EUC_KR'|'EUC_TW'|\n\
@@ -341,7 +340,7 @@ TIMEZONE|XACTISOLEVEL|CLIENT_ENCODING|SERVER_ENCODING"},
341340
{"show",
342341
"show current run-time environment",
343342
"\
344-
\tSHOW DATESTYLE|COST_HEAP|COST_INDEX|GEQO|KSQO|QUERY_LIMIT|\n\
343+
\tSHOW DATESTYLE|COST_HEAP|COST_INDEX|GEQO|KSQO|\n\
345344
TIMEZONE|XACTISOLEVEL|CLIENT_ENCODING|SERVER_ENCODING"},
346345
{"unlisten",
347346
"stop listening for notification on a condition name",

src/include/executor/executor.h

+1-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: executor.h,v 1.33 1999/05/25 16:13:53 momjian Exp $
9+
* $Id: executor.h,v 1.34 1999/06/17 15:15:53 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -89,12 +89,6 @@ extern void ExecutorEnd(QueryDesc *queryDesc, EState *estate);
8989
extern void ExecConstraints(char *caller, Relation rel, HeapTuple tuple,
9090
EState *estate);
9191

92-
#ifdef QUERY_LIMIT
93-
extern int ExecutorLimit(int limit);
94-
extern int ExecutorGetLimit(void);
95-
96-
#endif
97-
9892
/*
9993
* prototypes from functions in execProcnode.c
10094
*/

src/include/utils/memutils.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* Copyright (c) 1994, Regents of the University of California
1717
*
18-
* $Id: memutils.h,v 1.27 1999/05/26 12:57:07 momjian Exp $
18+
* $Id: memutils.h,v 1.28 1999/06/17 15:15:59 momjian Exp $
1919
*
2020
* NOTES
2121
* some of the information in this file will be moved to
@@ -33,18 +33,18 @@
3333
* There used to be some incredibly crufty platform-dependent hackery here,
3434
* but now we rely on the configure script to get the info for us. Much nicer.
3535
*
36-
* NOTE: _ALIGN will not work if ALIGNVAL is not a power of 2.
36+
* NOTE: TYPEALIGN will not work if ALIGNVAL is not a power of 2.
3737
* That case seems extremely unlikely to occur in practice, however.
3838
* ----------------
3939
*/
4040

41-
#define _ALIGN(ALIGNVAL,LEN) (((long)(LEN) + (ALIGNVAL-1)) & ~(ALIGNVAL-1))
41+
#define TYPEALIGN(ALIGNVAL,LEN) (((long)(LEN) + (ALIGNVAL-1)) & ~(ALIGNVAL-1))
4242

43-
#define SHORTALIGN(LEN) _ALIGN(ALIGNOF_SHORT, (LEN))
44-
#define INTALIGN(LEN) _ALIGN(ALIGNOF_INT, (LEN))
45-
#define LONGALIGN(LEN) _ALIGN(ALIGNOF_LONG, (LEN))
46-
#define DOUBLEALIGN(LEN) _ALIGN(ALIGNOF_DOUBLE, (LEN))
47-
#define MAXALIGN(LEN) _ALIGN(MAXIMUM_ALIGNOF, (LEN))
43+
#define SHORTALIGN(LEN) TYPEALIGN(ALIGNOF_SHORT, (LEN))
44+
#define INTALIGN(LEN) TYPEALIGN(ALIGNOF_INT, (LEN))
45+
#define LONGALIGN(LEN) TYPEALIGN(ALIGNOF_LONG, (LEN))
46+
#define DOUBLEALIGN(LEN) TYPEALIGN(ALIGNOF_DOUBLE, (LEN))
47+
#define MAXALIGN(LEN) TYPEALIGN(MAXIMUM_ALIGNOF, (LEN))
4848

4949
/*****************************************************************************
5050
* oset.h -- Fixed format ordered set definitions. *

src/interfaces/libpq/fe-connect.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.97 1999/05/25 16:15:11 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.98 1999/06/17 15:16:04 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -139,9 +139,6 @@ static struct EnvironmentOptions
139139
{
140140
"PGGEQO", "geqo"
141141
},
142-
{
143-
"PGQUERY_LIMIT", "query_limit"
144-
},
145142
{
146143
NULL
147144
}

src/man/set.l

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" This is -*-nroff-*-
22
.\" XXX standard disclaimer belongs here....
3-
.\" $Header: /cvsroot/pgsql/src/man/Attic/set.l,v 1.22 1999/06/09 03:51:40 vadim Exp $
3+
.\" $Header: /cvsroot/pgsql/src/man/Attic/set.l,v 1.23 1999/06/17 15:16:06 momjian Exp $
44
.TH SET SQL 05/14/97 PostgreSQL PostgreSQL
55
.SH NAME
66
set - set run-time parameters for session
@@ -74,10 +74,6 @@ enables or disables a workaround for memory exhaustion in queries with many
7474
clauses.
7575
The default is disabled.
7676
.PP
77-
.IR QUERY_LIMIT
78-
restricts the number of rows returned by a query.
79-
The default is unlimited.
80-
.PP
8177
.IR TIMEZONE
8278
sets your timezone.
8379
.PP

src/template/linux_ppc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AROPT:crs
2-
CFLAGS:-O -mieee # optimization -O2 removed because of egcs problem
2+
CFLAGS:-O2 -mieee
33
SHARED_LIB:-fpic
44
ALL:
55
SRCH_INC:

0 commit comments

Comments
 (0)