for Irix.
sets the default cost for indexed searches for the optimizer.
</para>
</listitem>
- <listitem>
- <para>
- <envar>PGQUERY_LIMIT</envar>
- sets the maximum number of rows returned by a query.
- </para>
- </listitem>
</itemizedlist>
</para>
sets the default cost for indexed searches for the optimizer.
</Para>
</ListItem>
-<ListItem>
-<Para>
-<Acronym>PGQUERY_LIMIT</Acronym>
-sets the maximum number of rows returned by a query.
-</Para>
-</ListItem>
</ItemizedList>
</Para>
</listitem>
</varlistentry>
- <varlistentry>
- <term>
- QUERY_LIMIT
- </term>
- <listitem>
- <para>
- Sets the maximum number of rows returned by a query.
- By default, there is no limit to the number of rows
- returned by a query.
-
- <variablelist>
- <varlistentry>
- <term>
- <replaceable class="parameter">#</replaceable>
- </term>
- <listitem>
- <para>
- Sets the maximum number of rows returned by a
- query to <replaceable class="parameter">#</replaceable>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- DEFAULT
- </term>
- <listitem>
- <para>
- Sets the maximum number of rows returned by a query to be unlimited.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </listitem>
- </varlistentry>
-
</variablelist>
</para>
</refsect2>
#include "utils/builtins.h"
#include "optimizer/internal.h"
#include "access/xact.h"
+#include "utils/tqual.h"
#ifdef MULTIBYTE
#include "mb/pg_wchar.h"
#endif
-#ifdef QUERY_LIMIT
-#include "executor/executor.h"
-#include "executor/execdefs.h"
-#endif
-
static bool show_date(void);
static bool reset_date(void);
static bool parse_date(const char *);
static bool reset_XactIsoLevel(void);
static bool parse_XactIsoLevel(const char *);
-#ifdef QUERY_LIMIT
-static bool show_query_limit(void);
-static bool reset_query_limit(void);
-static bool parse_query_limit(const char *);
-
-#endif
-
extern Cost _cpu_page_wight_;
extern Cost _cpu_index_page_wight_;
extern bool _use_geqo_;
return TRUE;
} /* reset_timezone() */
-/*
- *
- * Query_limit
- *
- */
-#ifdef QUERY_LIMIT
-static bool
-parse_query_limit(const char *value)
-{
- int32 limit;
-
- if (value == NULL)
- {
- reset_query_limit();
- return (TRUE);
- }
- /* why is pg_atoi's arg not declared "const char *" ? */
- limit = pg_atoi((char *) value, sizeof(int32), '\0');
- if (limit <= -1)
- elog(ERROR, "Bad value for # of query limit (%s)", value);
- ExecutorLimit(limit);
- return (TRUE);
-}
-
-static bool
-show_query_limit(void)
-{
- int limit;
-
- limit = ExecutorGetLimit();
- if (limit == ALL_TUPLES)
- elog(NOTICE, "No query limit is set");
- else
- elog(NOTICE, "query limit is %d", limit);
- return (TRUE);
-}
-
-static bool
-reset_query_limit(void)
-{
- ExecutorLimit(ALL_TUPLES);
- return (TRUE);
-}
-
-#endif
-
/*-----------------------------------------------------------------------*/
struct VariableParsers
{
"XactIsoLevel", parse_XactIsoLevel, show_XactIsoLevel, reset_XactIsoLevel
},
-#ifdef QUERY_LIMIT
- {
- "query_limit", parse_query_limit, show_query_limit, reset_query_limit
- },
-#endif
{
NULL, NULL, NULL, NULL
}
/* end of local decls */
-#ifdef QUERY_LIMIT
-static int queryLimit = ALL_TUPLES;
-
-#undef ALL_TUPLES
-#define ALL_TUPLES queryLimit
-
-int
-ExecutorLimit(int limit)
-{
- return queryLimit = limit;
-}
-
-int
-ExecutorGetLimit()
-{
- return queryLimit;
-}
-
-#endif
-
/* ----------------------------------------------------------------
* ExecutorStart
*
{"reset",
"set run-time environment back to default",
"\
-\tRESET DATESTYLE|COST_HEAP|COST_INDEX|GEQO|KSQO|QUERY_LIMIT|\n\
+\tRESET DATESTYLE|COST_HEAP|COST_INDEX|GEQO|KSQO|\n\
TIMEZONE|XACTISOLEVEL|CLIENT_ENCODING|SERVER_ENCODING"},
{"revoke",
"revoke access control from a user or group",
\tSET COST_INDEX TO #\n\
\tSET GEQO TO 'ON[=#]'|'OFF'\n\
\tSET KSQO TO 'ON'|'OFF'\n\
-\tSET QUERY_LIMIT TO #\n\
\tSET TIMEZONE TO 'value'\n\
\tSET TRANSACTION ISOLATION LEVEL 'SERIALIZABLE'|'READ COMMITTED'\n\
\tSET CLIENT_ENCODING|NAMES TO 'EUC_JP'|'SJIS'|'EUC_CN'|'EUC_KR'|'EUC_TW'|\n\
{"show",
"show current run-time environment",
"\
-\tSHOW DATESTYLE|COST_HEAP|COST_INDEX|GEQO|KSQO|QUERY_LIMIT|\n\
+\tSHOW DATESTYLE|COST_HEAP|COST_INDEX|GEQO|KSQO|\n\
TIMEZONE|XACTISOLEVEL|CLIENT_ENCODING|SERVER_ENCODING"},
{"unlisten",
"stop listening for notification on a condition name",
extern void ExecConstraints(char *caller, Relation rel, HeapTuple tuple,
EState *estate);
-#ifdef QUERY_LIMIT
-extern int ExecutorLimit(int limit);
-extern int ExecutorGetLimit(void);
-
-#endif
-
/*
* prototypes from functions in execProcnode.c
*/
* There used to be some incredibly crufty platform-dependent hackery here,
* but now we rely on the configure script to get the info for us. Much nicer.
*
- * NOTE: _ALIGN will not work if ALIGNVAL is not a power of 2.
+ * NOTE: TYPEALIGN will not work if ALIGNVAL is not a power of 2.
* That case seems extremely unlikely to occur in practice, however.
* ----------------
*/
-#define _ALIGN(ALIGNVAL,LEN) (((long)(LEN) + (ALIGNVAL-1)) & ~(ALIGNVAL-1))
+#define TYPEALIGN(ALIGNVAL,LEN) (((long)(LEN) + (ALIGNVAL-1)) & ~(ALIGNVAL-1))
-#define SHORTALIGN(LEN) _ALIGN(ALIGNOF_SHORT, (LEN))
-#define INTALIGN(LEN) _ALIGN(ALIGNOF_INT, (LEN))
-#define LONGALIGN(LEN) _ALIGN(ALIGNOF_LONG, (LEN))
-#define DOUBLEALIGN(LEN) _ALIGN(ALIGNOF_DOUBLE, (LEN))
-#define MAXALIGN(LEN) _ALIGN(MAXIMUM_ALIGNOF, (LEN))
+#define SHORTALIGN(LEN) TYPEALIGN(ALIGNOF_SHORT, (LEN))
+#define INTALIGN(LEN) TYPEALIGN(ALIGNOF_INT, (LEN))
+#define LONGALIGN(LEN) TYPEALIGN(ALIGNOF_LONG, (LEN))
+#define DOUBLEALIGN(LEN) TYPEALIGN(ALIGNOF_DOUBLE, (LEN))
+#define MAXALIGN(LEN) TYPEALIGN(MAXIMUM_ALIGNOF, (LEN))
/*****************************************************************************
* oset.h -- Fixed format ordered set definitions. *
{
"PGGEQO", "geqo"
},
- {
- "PGQUERY_LIMIT", "query_limit"
- },
{
NULL
}
clauses.
The default is disabled.
.PP
-.IR QUERY_LIMIT
-restricts the number of rows returned by a query.
-The default is unlimited.
-.PP
.IR TIMEZONE
sets your timezone.
.PP
AROPT:crs
-CFLAGS:-O -mieee # optimization -O2 removed because of egcs problem
+CFLAGS:-O2 -mieee
SHARED_LIB:-fpic
ALL:
SRCH_INC: