summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane1999-10-23 03:13:33 +0000
committerTom Lane1999-10-23 03:13:33 +0000
commitecd0bfa81a8290219f4973b8fd456a2ffeb11d40 (patch)
tree734cc8342c23bc8b1643ee1859003943015e7c03 /src/include
parent627b5e9c20d91cfdd5e6fd672ec997c8fbb3a2a2 (diff)
Look Ma, no MAX_PARSE_BUFFER! (At least not in the backend.
pg_dump and interfaces/odbc still need some work.)
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/ibit.h7
-rw-r--r--src/include/access/itup.h3
-rw-r--r--src/include/libpq/hba.h13
-rw-r--r--src/include/libpq/libpq.h14
-rw-r--r--src/include/miscadmin.h5
-rw-r--r--src/include/postgres.h15
-rw-r--r--src/include/tcop/fastpath.h3
-rw-r--r--src/include/utils/memutils.h49
8 files changed, 21 insertions, 88 deletions
diff --git a/src/include/access/ibit.h b/src/include/access/ibit.h
index 31ccc99191..0adb3167ee 100644
--- a/src/include/access/ibit.h
+++ b/src/include/access/ibit.h
@@ -6,19 +6,18 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: ibit.h,v 1.10 1999/07/15 23:03:34 momjian Exp $
+ * $Id: ibit.h,v 1.11 1999/10/23 03:13:27 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef IBIT_H
#define IBIT_H
-#include "utils/memutils.h"
+#include "catalog/pg_index.h"
typedef struct IndexAttributeBitMapData
{
- char bits[(MaxIndexAttributeNumber + MaxBitsPerByte - 1)
- / MaxBitsPerByte];
+ bits8 bits[(INDEX_MAX_KEYS + 8 - 1)/8];
} IndexAttributeBitMapData;
typedef IndexAttributeBitMapData *IndexAttributeBitMap;
diff --git a/src/include/access/itup.h b/src/include/access/itup.h
index 3294d1948a..30865a8e02 100644
--- a/src/include/access/itup.h
+++ b/src/include/access/itup.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: itup.h,v 1.21 1999/07/19 07:07:28 momjian Exp $
+ * $Id: itup.h,v 1.22 1999/10/23 03:13:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,7 +18,6 @@
#include "access/tupmacs.h"
#include "storage/itemptr.h"
-#define MaxIndexAttributeNumber 7
typedef struct IndexTupleData
{
diff --git a/src/include/libpq/hba.h b/src/include/libpq/hba.h
index d1dc7ec121..5dcf49100d 100644
--- a/src/include/libpq/hba.h
+++ b/src/include/libpq/hba.h
@@ -4,7 +4,7 @@
* Interface to hba.c
*
*
- * $Id: hba.h,v 1.15 1999/09/27 03:13:10 momjian Exp $
+ * $Id: hba.h,v 1.16 1999/10/23 03:13:29 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,19 +24,10 @@
#define OLD_CONF_FILE "pg_hba"
/* Name of the config file in prior releases of Postgres. */
-#define MAX_LINES 255
- /* Maximum number of config lines that can apply to one database */
-
-#define MAX_TOKEN 80
-/* Maximum size of one token in the configuration file */
-
-#define MAX_AUTH_ARG 80 /* Max size of an authentication arg */
-
#define IDENT_PORT 113
/* Standard TCP port number for Ident service. Assigned by IANA */
-#define IDENT_USERNAME_MAX 512
- /* Max size of username ident server can return */
+#define MAX_AUTH_ARG 80 /* Max size of an authentication arg */
typedef enum UserAuth
{
diff --git a/src/include/libpq/libpq.h b/src/include/libpq/libpq.h
index 463c5564b4..07d6d3ef31 100644
--- a/src/include/libpq/libpq.h
+++ b/src/include/libpq/libpq.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: libpq.h,v 1.33 1999/08/31 04:26:33 tgl Exp $
+ * $Id: libpq.h,v 1.34 1999/10/23 03:13:29 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -135,15 +135,15 @@ extern Exception MemoryError,
ProtocolError;
/*
- * POSTGRES backend dependent Constants.
+ * PQerrormsg[] is used only for error messages generated within backend
+ * libpq, none of which are remarkably long. Note that this length should
+ * NOT be taken as any indication of the maximum error message length that
+ * the backend can create! elog() can in fact produce extremely long messages.
*/
-/* ERROR_MSG_LENGTH should really be the same as ELOG_MAXLEN in utils/elog.h*/
-#define ERROR_MSG_LENGTH 4096
-#define COMMAND_LENGTH 20
-#define REMARK_LENGTH 80
+#define PQERRORMSG_LENGTH 1024
-extern char PQerrormsg[ERROR_MSG_LENGTH]; /* in portal.c */
+extern char PQerrormsg[PQERRORMSG_LENGTH]; /* in libpq/util.c */
/*
* External functions.
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index 7b23a98bf9..a26024f724 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -11,7 +11,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: miscadmin.h,v 1.44 1999/10/08 04:28:52 momjian Exp $
+ * $Id: miscadmin.h,v 1.45 1999/10/23 03:13:30 tgl Exp $
*
* NOTES
* some of the information in this file will be moved to
@@ -101,9 +101,6 @@ extern int SortMem;
extern Oid LastOidProcessed; /* for query rewrite */
-/* #define MAX_QUERY_SIZE (BLCKSZ*2) */
-#define MAX_PARSE_BUFFER MAX_QUERY_SIZE
-
/*****************************************************************************
* pdir.h -- *
* POSTGRES directory path definitions. *
diff --git a/src/include/postgres.h b/src/include/postgres.h
index ad6cda6795..5835f44486 100644
--- a/src/include/postgres.h
+++ b/src/include/postgres.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1995, Regents of the University of California
*
- * $Id: postgres.h,v 1.26 1999/07/17 04:12:10 momjian Exp $
+ * $Id: postgres.h,v 1.27 1999/10/23 03:13:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -54,7 +54,7 @@ typedef double float8;
typedef int4 aclitem;
#define InvalidOid 0
-#define OidIsValid(objectId) ((bool) (objectId != InvalidOid))
+#define OidIsValid(objectId) ((bool) ((objectId) != InvalidOid))
/* unfortunately, both regproc and RegProcedure are used */
typedef Oid regproc;
@@ -147,7 +147,7 @@ typedef uint32 CommandId;
/* ----------------------------------------------------------------
* Section 5: random stuff
- * CSIGNBIT, MAXPGPATH, STATUS...
+ * CSIGNBIT, STATUS...
* ----------------------------------------------------------------
*/
@@ -158,12 +158,8 @@ typedef uint32 CommandId;
/* msb for char */
#define CSIGNBIT (0x80)
-/* ----------------
- * global variables which should probably go someplace else.
- * ----------------
- */
+/* this should probably be somewhere else */
#define MAXPGPATH 128
-#define MAX_QUERY_SIZE (BLCKSZ*2)
#define STATUS_OK (0)
#define STATUS_ERROR (-1)
@@ -180,8 +176,7 @@ typedef uint32 CommandId;
* ---------------
*/
#ifdef CYR_RECODE
-void SetCharSet();
-
+extern void SetCharSet();
#endif /* CYR_RECODE */
#endif /* POSTGRES_H */
diff --git a/src/include/tcop/fastpath.h b/src/include/tcop/fastpath.h
index 09d111102f..8d7de65de0 100644
--- a/src/include/tcop/fastpath.h
+++ b/src/include/tcop/fastpath.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: fastpath.h,v 1.5 1999/02/13 23:22:12 momjian Exp $
+ * $Id: fastpath.h,v 1.6 1999/10/23 03:13:32 tgl Exp $
*
* NOTES
* This information pulled out of tcop/fastpath.c and put
@@ -24,7 +24,6 @@
*/
#define VAR_LENGTH_RESULT (-1)
#define VAR_LENGTH_ARG (-5)
-#define MAX_STRING_LENGTH 256
extern int HandleFunctionRequest(void);
diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h
index cac5facc31..9c59ff2d9f 100644
--- a/src/include/utils/memutils.h
+++ b/src/include/utils/memutils.h
@@ -8,29 +8,17 @@
* align.h alignment macros
* aset.h memory allocation set stuff
* oset.h (used by aset.h)
- * (bit.h bit array type / extern)
- * clib.h mem routines
- * limit.h max bits/byte, etc.
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: memutils.h,v 1.31 1999/08/24 20:11:19 tgl Exp $
- *
- * NOTES
- * some of the information in this file will be moved to
- * other files, (like MaxHeapTupleSize and MaxAttributeSize).
+ * $Id: memutils.h,v 1.32 1999/10/23 03:13:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef MEMUTILS_H
#define MEMUTILS_H
-/*
- * This is not needed by this include file, but by almost every file
- * that includes this file.
- */
-
/* ----------------
* Alignment macros: align a length or address appropriately for a given type.
*
@@ -236,40 +224,5 @@ extern AllocPointer AllocSetRealloc(AllocSet set, AllocPointer pointer,
extern void AllocSetDump(AllocSet set);
-/*****************************************************************************
- * clib.h -- Standard C library definitions *
- *****************************************************************************/
-/*
- * Note:
- * This file is OPERATING SYSTEM dependent!!!
- *
- */
-
-/*
- * LibCCopyLength is only used within this file. -cim 6/12/90
- *
- */
-typedef int LibCCopyLength;
-
-/*
- * MemoryCopy
- * Copies fixed length block of memory to another.
- */
-#define MemoryCopy(toBuffer, fromBuffer, length)\
- memcpy(toBuffer, fromBuffer, length)
-
-/*****************************************************************************
- * limit.h -- POSTGRES limit definitions. *
- *****************************************************************************/
-
-#define MaxBitsPerByte 8
-
-typedef uint32 AttributeSize; /* XXX should be defined elsewhere */
-
-#define MaxHeapTupleSize 0x7fffffff
-#define MaxAttributeSize 0x7fffffff
-
-#define MaxIndexAttributeNumber 7
-
#endif /* MEMUTILS_H */