Remove QUERY_LIMIT and documenation on same. Change _ALIGN to TYPEALIGN
authorBruce Momjian <[email protected]>
Thu, 17 Jun 1999 15:16:09 +0000 (15:16 +0000)
committerBruce Momjian <[email protected]>
Thu, 17 Jun 1999 15:16:09 +0000 (15:16 +0000)
for Irix.

doc/src/sgml/libpq++.sgml
doc/src/sgml/libpq.sgml
doc/src/sgml/ref/set.sgml
src/backend/commands/variable.c
src/backend/executor/execMain.c
src/bin/psql/psqlHelp.h
src/include/executor/executor.h
src/include/utils/memutils.h
src/interfaces/libpq/fe-connect.c
src/man/set.l
src/template/linux_ppc

index 8830709064eb072315f15e5e3f2b294c52e0d968..b9a0d84216f526149140284eb255d7a5546381aa 100644 (file)
        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>
        
index e9d7343cb9538b0df7f3437958caed9d69c0847e..b54eb37a9fb0721edde65dfa66754cd7522bdabc 100644 (file)
@@ -1521,12 +1521,6 @@ sets the default cost for heap searches for the optimizer.
 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>
 
index 9e4f7a4dee759e54ee87852a2ab7fa35bb2f44d0..fd8eb8df2b9d37190fc309543d0d5df0260618b0 100644 (file)
@@ -601,43 +601,6 @@ SET TRANSACTION ISOLATION LEVEL { READ COMMITTED | SERIALIZED }
       </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>
index a54c217f5bb2a9f9155aa145b19faa325f83c437..589955fa50b3922e5d60de7a70e099f1b6c62f66 100644 (file)
 #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 *);
@@ -46,13 +42,6 @@ static bool show_XactIsoLevel(void);
 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_;
@@ -538,52 +527,6 @@ reset_timezone()
        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
@@ -624,11 +567,6 @@ 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
        }
index febcb81f7d18ae6565333b69e27a620376b35544..4491d7cf872d332f5e022faed9041c3002c2ff55 100644 (file)
@@ -88,26 +88,6 @@ static TupleTableSlot *EvalPlanQualNext(EState *estate);
 
 /* 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
  *
index a1960b3957ad8c86511bb00c7d86af60214cfc5d..3015d8d7ecc35daf7cc42fc1946dc58637ee309f 100644 (file)
@@ -296,7 +296,7 @@ static struct _helpStruct QL_HELP[] = {
        {"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",
@@ -329,7 +329,6 @@ TIMEZONE|XACTISOLEVEL|CLIENT_ENCODING|SERVER_ENCODING"},
 \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\
@@ -341,7 +340,7 @@ TIMEZONE|XACTISOLEVEL|CLIENT_ENCODING|SERVER_ENCODING"},
        {"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",
index 3bb5bec273494cfe17ca2e9ac67ad00886ade64c..325402d24a79c4259376ce764b89daeaad847110 100644 (file)
@@ -89,12 +89,6 @@ extern void ExecutorEnd(QueryDesc *queryDesc, EState *estate);
 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
  */
index 725e8c2197ac748a3c8c1a400a44986c3f60a3e5..ade7410a7f07903347a77e94855d090503055bff 100644 (file)
  * 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.                            *
index 91de6d5d4d9221cd17659f3ef1b2db7eeffdfe2f..8f97bc96479c4fb20f64b301e61c74d11a90f5df 100644 (file)
@@ -139,9 +139,6 @@ static struct EnvironmentOptions
        {
                "PGGEQO", "geqo"
        },
-       {
-               "PGQUERY_LIMIT", "query_limit"
-       },
        {
                NULL
        }
index a29c9d097dd06c4636d0604cff1988220eb41d10..2d35ff41207ac90cb22a3d07a550a6e001de1696 100644 (file)
@@ -74,10 +74,6 @@ enables or disables a workaround for memory exhaustion in queries with many
 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
index 1e116ded6b848e3bbe3e5ecb4d2572bbbb8a501d..a8f5a20e9071b2da8a2973a8e1159c148e1c031e 100755 (executable)
@@ -1,5 +1,5 @@
 AROPT:crs
-CFLAGS:-O -mieee  # optimization -O2 removed because of egcs problem
+CFLAGS:-O2 -mieee
 SHARED_LIB:-fpic
 ALL:
 SRCH_INC: