#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.57 1996/11/09 10:39:02 scrappy Exp $
+# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.58 1996/11/10 02:56:33 momjian Exp $
#
# NOTES
# This is seen by any Makefiles that include mk/postgres.mk. To
# Flags for CC and LD. (depend on COPT and PROFILE)
#
# PostgreSQL should *always* compile with -Wall -Werror enabled
-CFLAGS+= -Wall #-Werror
+CFLAGS+= -Wall -Wmissing-prototypes -Wmissing-declarations #-Werror
# Globally pass debugging/optimization/profiling flags based
# on the options selected above.
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.15 1996/11/05 07:42:40 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.16 1996/11/10 02:56:41 momjian Exp $
*
* NOTES
* The old interface functions have been converted to macros
#include <postgres.h>
+#include <access/heapam.h>
#include <access/htup.h>
#include <access/transam.h>
#include <access/tupmacs.h>
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/Attic/heapvalid.c,v 1.11 1996/11/05 07:42:41 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/Attic/heapvalid.c,v 1.12 1996/11/10 02:56:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include <fmgr.h>
#include <access/heaptuple.h>
+#include <access/valid.h>
#include <access/xact.h>
#include <storage/bufpage.h>
#include <utils/rel.h>
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/Attic/indexvalid.c,v 1.11 1996/11/05 07:42:43 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/Attic/indexvalid.c,v 1.12 1996/11/10 02:56:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include <postgres.h>
#include <access/htup.h>
+#include <access/iqual.h>
#include <access/itup.h>
#include <access/skey.h>
#include <executor/execdebug.h>
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.11 1996/11/05 07:42:44 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.12 1996/11/10 02:57:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include <fmgr.h>
#include <access/heaptuple.h>
+#include <access/printtup.h>
#include <catalog/pg_type.h>
#include <libpq/libpq.h>
#include <utils/syscache.h>
#ifdef GISTDEBUG
-extern char *text_range_out();
-extern char *int_range_out();
-
/*
** sloppy debugging support routine, requires recompilation with appropriate
** "out" method for the index keys. Could be fixed to find that info
datum = ((char *) itup);
datum += sizeof(IndexTupleData);
/* get out function for type of key, and out it! */
- itkey = (char *) int_range_out(datum);
+ itkey = (char *) int_range_out((INTRANGE *)datum);
/* itkey = " unable to print"; */
printf("\t[%d] size %d heap <%d,%d> key:%s\n",
offnum, IndexTupleSize(itup), itblkno, itoffno, itkey);
}
}
-#define TRLOWER(tr) (((tr)->bytes))
-#define TRUPPER(tr) (&((tr)->bytes[MAXALIGN(VARSIZE(TRLOWER(tr)))]))
-typedef struct txtrange {
- /* flag: NINF means that lower is negative infinity; PINF means that
- ** upper is positive infinity. 0 means that both are numbers.
- */
- int32 vl_len;
- int32 flag;
- char bytes[2];
-} TXTRANGE;
-
-typedef struct intrange {
- int lower;
- int upper;
- /* flag: NINF means that lower is negative infinity; PINF means that
- ** upper is positive infinity. 0 means that both are numbers.
- */
- int flag;
-} INTRANGE;
-
char *text_range_out(TXTRANGE *r)
{
char *result;
#include <postgres.h>
#include <access/gist.h>
+#include <access/gistscan.h>
#include <access/genam.h>
#include <access/rtree.h>
#include <storage/bufmgr.h>
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.2 1996/10/20 06:34:14 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.3 1996/11/10 02:57:40 momjian Exp $
*
* NOTES
* These functions are stored in pg_amproc. For each operator class
#include "postgres.h"
+#include "access/hash.h"
+
uint32 hashint2(int16 key)
{
return ((uint32) ~key);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/stats.c,v 1.8 1996/11/05 11:17:47 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/stats.c,v 1.9 1996/11/10 02:58:11 momjian Exp $
*
* NOTES
* initam should be moved someplace else.
* ----------------
*/
void
-initam()
+initam(void)
{
/* ----------------
* initialize heap statistics.
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.5 1996/11/05 10:35:28 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.6 1996/11/10 02:58:37 momjian Exp $
*
* NOTES
* These functions are stored in pg_amproc. For each operator class
#include <postgres.h>
+#include <utils/builtins.h>
#include <utils/nabstime.h>
int32
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.4 1996/11/05 10:54:17 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.5 1996/11/10 02:58:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include <postgres.h>
+#include <utils/builtins.h>
#include <utils/geo-decls.h>
#ifndef HAVE_MEMMOVE
# include <regex/utils.h>
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.5 1996/11/05 11:12:28 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.6 1996/11/10 02:59:11 momjian Exp $
*
* NOTES
* This file contains the high level access-method interface to the
* ----------------
*/
int
-RecoveryCheckingEnabled()
+RecoveryCheckingEnabled(void)
{
return RecoveryCheckingEnableState;
}
* Initializes transaction logging.
*/
void
-InitializeTransactionLog()
+InitializeTransactionLog(void)
{
Relation logRelation;
Relation timeRelation;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.4 1996/11/05 11:12:32 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.5 1996/11/10 02:59:16 momjian Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
static int TransactionFlushState = 1;
int
-TransactionFlushEnabled()
+TransactionFlushEnabled(void)
{
return TransactionFlushState;
}
* --------------------------------
*/
bool
-IsTransactionState()
+IsTransactionState(void)
{
TransactionState s = CurrentTransactionState;
* --------------------------------
*/
void
-BeginTransactionBlock()
+BeginTransactionBlock(void)
{
TransactionState s = CurrentTransactionState;
* --------------------------------
*/
void
-EndTransactionBlock()
+EndTransactionBlock(void)
{
TransactionState s = CurrentTransactionState;
* --------------------------------
*/
void
-AbortTransactionBlock()
+AbortTransactionBlock(void)
{
TransactionState s = CurrentTransactionState;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.4 1996/11/05 11:12:33 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.5 1996/11/10 02:59:19 momjian Exp $
*
* OLD COMMENTS
* XXX WARNING
#include <stdio.h>
#include <postgres.h>
+#include <access/xact.h>
extern TransactionId NullTransactionId;
extern TransactionId DisabledTransactionId;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.4 1996/11/06 06:47:01 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.5 1996/11/10 02:59:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
return(relname);
}
+#ifdef NOT_USED
/*
* issystem - returns non-zero iff relname is a system catalog
*
else
return FALSE;
}
+#endif
/*
* IsSystemRelationName --
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.7 1996/11/08 00:59:10 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.8 1996/11/10 02:59:25 momjian Exp $
*
* INTERFACE ROUTINES
* heap_creatr() - Create an uncataloged heap relation
*/
#include <postgres.h>
-#include <catalog/pg_ipl.h>
-#include <catalog/pg_inherits.h>
-#include <catalog/pg_proc.h>
#include <miscadmin.h>
-#include <catalog/indexing.h>
-#include <catalog/catalog.h>
-#include <utils/builtins.h>
+#include <fmgr.h>
#include <access/heapam.h>
-#include <utils/mcxt.h>
-#include <parser/catalog_utils.h>
+#include <catalog/catalog.h>
+#include <catalog/catname.h>
+#include <catalog/heap.h>
#include <catalog/index.h>
-#include <fmgr.h>
+#include <catalog/indexing.h>
+#include <catalog/pg_ipl.h>
+#include <catalog/pg_inherits.h>
+#include <catalog/pg_proc.h>
#include <catalog/pg_index.h>
#include <catalog/pg_type.h>
-#include <catalog/catname.h>
-#include <utils/relcache.h>
#include <storage/bufmgr.h>
-#include <catalog/heap.h>
-#include <rewrite/rewriteRemove.h>
#include <storage/lmgr.h>
#include <storage/smgr.h>
+#include <parser/catalog_utils.h>
+#include <rewrite/rewriteRemove.h>
+#include <utils/builtins.h>
+#include <utils/mcxt.h>
+#include <utils/relcache.h>
#ifndef HAVE_MEMMOVE
# include <regex/utils.h>
#else
*/
void
-InitTempRelList()
+InitTempRelList(void)
{
if (tempRels) {
free(tempRels->rels);
go through the tempRels list and destroy each of the relations
*/
void
-DestroyTempRels()
+DestroyTempRels(void)
{
int i;
Relation rdesc;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.15 1996/11/08 00:45:22 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.16 1996/11/10 02:59:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include <catalog/pg_type.h>
#include <catalog/catname.h>
#include <catalog/pg_user.h>
+#include <commands/copy.h>
#define ISOCTAL(c) (((c) >= '0') && ((c) <= '7'))
#define VALUE(c) ((c) - '0')
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.9 1996/11/08 20:45:16 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.10 1996/11/10 02:59:38 momjian Exp $
*
* DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the
#define DEFAULT_TYPDELIM ','
-void
+static void
case_translate_language_name(const char *input, char *output) {
/*-------------------------------------------------------------------------
Translate the input language name to lower case, except if it's C,
-void
+static void
compute_return_type(const Node *returnType,
char **prorettype_p, bool *returnsSet_p) {
/*---------------------------------------------------------------------------
-void
+static void
compute_full_attributes(const List *parameters, int32 *byte_pct_p,
int32 *perbyte_cpu_p, int32 *percall_cpu_p,
int32 *outin_ratio_p, bool *canCache_p) {
-void
+static void
interpret_AS_clause(const char languageName[], const char as[],
char **prosrc_str_p, char **probin_str_p) {
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.3 1996/11/06 08:21:39 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.4 1996/11/10 02:59:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include <catalog/indexing.h>
#include <catalog/catalog.h>
#include <commands/copy.h>
+#include <commands/rename.h>
#include <executor/execdefs.h> /* for EXEC_{FOR,BACK,FDEBUG,BDEBUG} */
#include <miscadmin.h>
#include <utils/portal.h>
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.4 1996/11/06 08:21:43 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.5 1996/11/10 02:59:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include <rewrite/rewriteManip.h>
#include <rewrite/rewriteRemove.h>
#include <commands/creatinh.h>
+#include <commands/view.h>
/*---------------------------------------------------------------------
* DefineVirtualRelation
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.4 1996/11/06 06:47:35 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.5 1996/11/10 02:59:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* ----------------------------------------------------------------
*/
void
-ResetTupleCount()
+ResetTupleCount(void)
{
NTupleProcessed = 0;
NTupleRetrieved = 0;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.4 1996/11/08 00:45:59 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.5 1996/11/10 02:59:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* by "sortOp" and reversing the positions of the keys.
* ----------------------------------------------------------------
*/
-List *
+static List *
MJFormISortopO(List *qualList, Oid sortOp)
{
List *ISortopO;
* ExecEndTee
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.4 1996/11/08 00:46:01 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.5 1996/11/10 03:00:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
because the left and right scans may be at different points
* ----------------------------------------------------------------
*/
-void
+static void
initTeeScanDescs(Tee* node)
{
TeeState *teeState;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.3 1996/11/06 08:27:11 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.4 1996/11/10 03:00:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include <lib/dllist.h>
Dllist*
-DLNewList()
+DLNewList(void)
{
Dllist* l;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-dumpdata.c,v 1.3 1996/11/06 08:48:24 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-dumpdata.c,v 1.4 1996/11/10 03:00:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* ----------------
*/
void
-be_portalinit()
+be_portalinit(void)
{
be_portalstack = DLNewList();
}
* ----------------
*/
PortalEntry *
-be_portalpop()
+be_portalpop(void)
{
PortalEntry *p;
Dlelem* elt;
* ----------------
*/
PortalEntry *
-be_currentportal()
+be_currentportal(void)
{
Dlelem* elt;
elt = DLGetTail(be_portalstack);
static u_int be_portalcnt = 0;
PortalEntry *
-be_newportal()
+be_newportal(void)
{
PortalEntry *entry;
char buf[PortalNameLength];
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.10 1996/11/06 08:48:27 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.11 1996/11/10 03:00:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* Some standard C libraries, including GNU, have an isblank() function.
Others, including Solaris, do not. So we have our own.
*/
-bool
+static bool
isblank(const char c) {
return(c == ' ' || c == 9 /* tab */);
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.3 1996/11/08 05:56:39 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.4 1996/11/10 03:00:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
return (true);
}
-bool _equalIter(Iter *a, Iter *b)
+static bool
+_equalIter(Iter *a, Iter *b)
{
return (equal(a->iterexpr, b->iterexpr));
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.2 1996/11/08 05:56:43 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.3 1996/11/10 03:00:44 momjian Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
* _outIntList -
* converts a List of integers
*/
-void
+static void
_outIntList(StringInfo str, List *list)
{
List *l;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.2 1996/11/06 08:54:17 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.3 1996/11/10 03:00:49 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
#include "nodes/pg_list.h"
#include "nodes/execnodes.h"
#include "nodes/parsenodes.h"
+#include "nodes/print.h"
#include "parser/parsetree.h"
#include "parser/catalog_utils.h"
#include "access/heapam.h"
}
+
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.3 1996/11/08 05:56:49 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.4 1996/11/10 03:00:51 momjian Exp $
*
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
* ----------------
*/
Node *
-parsePlanString()
+parsePlanString(void)
{
char *token;
int length;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.3 1996/11/08 05:56:52 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.4 1996/11/10 03:00:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*
*****************************************************************************/
+#ifdef OPTIMIZER_DEBUG
static void
print_joinclauses(Query *root, List *clauses)
{
}
}
-void
+static void
print_path(Query *root, Path *path, int indent)
{
char *ptype = NULL;
}
}
-#ifdef OPTIMIZER_DEBUG
static void
debug_print_rel(Query *root, Rel *rel)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.1.1.1 1996/07/09 06:21:38 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.2 1996/11/10 03:01:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "nodes/relation.h"
#include "optimizer/internal.h"
+#include "optimizer/joininfo.h"
#include "optimizer/var.h"
#include "optimizer/clauses.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.13 1996/11/08 05:57:25 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.14 1996/11/10 03:01:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*/
ParseState*
-makeParseState() {
+makeParseState(void)
+{
ParseState *pstate;
pstate = malloc(sizeof(ParseState));
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.8 1996/11/08 05:57:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.9 1996/11/10 03:01:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#define MAXFARGS 8 /* max # args to a c or postquel function */
-static Oid **argtype_inherit();
-static Oid **genxprod();
-
-static int findsupers(Oid relid, Oid **supervec);
/*
* This structure is used to explore the inheritance hierarchy above
* nodes in the type tree in order to disambiguate among polymorphic
struct _CandidateList *next;
} *CandidateList;
+static Oid **argtype_inherit(int nargs, Oid *oid_array);
+static Oid **genxprod(InhPaths *arginh, int nargs);
+static int findsupers(Oid relid, Oid **supervec);
+
/* check to see if a type id is valid,
* returns true if it is. By using this call before calling
* get_id_type or get_id_typname, more meaningful error messages
}
/* given a type, return its typetype ('c' for 'c'atalog types) */
-char
+static char
typetypetype(Type t)
{
TypeTupleForm typ;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.8 1996/11/10 02:23:15 bryanh Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.9 1996/11/10 03:01:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
return;
define_sets(parse);
}
-#endif
#ifdef SETS_FIXED
/* Recursively find all of the Consts in the parsetree. Some of
define_sets(get_leftop (clause));
define_sets(get_rightop (clause));
}
-#endif
}
+#endif
#define PSIZE(PTR) (*((int32 *)(PTR) - 1))
Node *
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.22 1996/11/10 02:24:12 bryanh Exp $
+ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.23 1996/11/10 03:01:41 momjian Exp $
*
* NOTES
*
* If you don't like that, well, we *used* to pass the whole option string
* as ONE argument to execl(), which was even less intelligent...
*/
-void
+static void
split_opts(char **argv, int *argcp, char *s)
{
int i = *argcp;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.1.1.1 1996/07/09 06:21:51 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.2 1996/11/10 03:01:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* if we find at least one such match, we return true
* otherwise, we return false
*/
-bool
+static bool
nodeThisLockWasTriggered(Node *node, int varno, AttrNumber attnum)
{
if (node==NULL)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.1.1.1 1996/07/09 06:21:51 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.2 1996/11/10 03:01:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "nodes/parsenodes.h"
#include "parser/catalog_utils.h"
#include "rewrite/locks.h"
+#include "rewrite/rewriteDefine.h"
#include "rewrite/rewriteRemove.h"
#include "rewrite/rewriteSupport.h"
#include "tcop/tcopprot.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.3 1996/11/06 06:48:44 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.4 1996/11/10 03:02:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "utils/lsyscache.h"
#include "utils/builtins.h"
#include "rewrite/rewriteHandler.h"
+#include "rewrite/rewriteManip.h"
#include "rewrite/rewriteSupport.h"
#include "rewrite/locks.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.2 1996/11/03 04:57:02 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.3 1996/11/10 03:02:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
}
}
+#ifdef NOT_USED
/*
* PrintBufferFreeList -
* prints the buffer free list, for debugging
*/
-void
+static void
PrintBufferFreeList()
{
BufferDesc *buf;
buf = &(BufferDescriptors[buf->freeNext]);
}
}
+
+#endif
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.3 1996/11/08 05:58:16 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.4 1996/11/10 03:02:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "storage/spin.h"
#include "storage/smgr.h"
#include "storage/lmgr.h"
+#include "storage/buf_internals.h"
#include "miscadmin.h"
#include "utils/builtins.h"
#include "utils/hsearch.h"
* buffer until we need it.
*/
void
-InitLocalBuffer()
+InitLocalBuffer(void)
{
int i;
* we will not need these buffers again.
*/
void
-LocalBufferSync()
+LocalBufferSync(void)
{
int i;
}
void
-ResetLocalBufferPool()
+ResetLocalBufferPool(void)
{
int i;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.8 1996/11/08 05:58:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.9 1996/11/10 03:02:21 momjian Exp $
*
* NOTES
*
} onexit_list[ MAX_ON_EXITS ];
static int onexit_index;
-static void IpcConfigTip();
+static void IpcConfigTip(void);
typedef struct _PrivateMemStruct {
int id;
#endif /* HAS_TEST_AND_SET */
static void
-IpcConfigTip()
+IpcConfigTip(void)
{
fprintf(stderr,"This type of error is usually caused by improper\n");
fprintf(stderr,"shared memory or System V IPC semaphore configuration.\n");
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.7 1996/11/06 06:49:04 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.8 1996/11/10 03:02:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#if defined(HAS_TEST_AND_SET)
+extern int tas(slock_t *lock);
+
#if defined (next)
/*
* NEXTSTEP (mach)
#if defined(i386_solaris) || \
defined(sparc_solaris)
-
/* for xxxxx_solaris, this is defined in port/.../tas.s */
-extern int tas(slock_t *lock);
void
S_LOCK(slock_t *lock)
#if defined(hpux)
-/* defined in port/.../tas.s */
-extern int tas(slock_t *lock);
-
/*
* a "set" slock_t has a single word cleared. a "clear" slock_t has
* all words set to non-zero.
defined(bsdi_2_1) || \
defined(linux)
+
int
tas(slock_t *m)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.5 1996/11/08 20:45:51 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.6 1996/11/10 03:02:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* ----------------------
*/
void
-ShmemBindingTabReset()
+ShmemBindingTabReset(void)
{
BindingTable = (HTAB *)NULL;
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.4 1996/11/06 06:49:09 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.5 1996/11/10 03:02:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
}
void
-InitSharedInvalidationState()
+InitSharedInvalidationState(void)
{
SpinAcquire(SInvalLock);
if (!SIBackendInit(shmInvalBuffer))
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.5 1996/11/08 05:58:41 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.6 1996/11/10 03:02:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#define IMINBLK 512
/* non-export function prototypes */
-static HeapTuple inv_fetchtup();
-static HeapTuple inv_newtuple();
+static HeapTuple inv_newtuple(LargeObjectDesc *obj_desc, Buffer buffer,
+ Page page, char *dbuf, int nwrite);
+static HeapTuple inv_fetchtup(LargeObjectDesc *obj_desc, Buffer *bufP);
static int inv_wrnew(LargeObjectDesc *obj_desc, char *buf, int nbytes);
static int inv_wrold(LargeObjectDesc *obj_desc, char *dbuf, int nbytes,
HeapTuple htup, Buffer buffer);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.2 1996/11/03 06:52:31 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.3 1996/11/10 03:02:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*
*/
void
-SendCopyBegin()
+SendCopyBegin(void)
{
pq_putnchar("B", 1);
/* pq_putint(0, 4); */
}
void
-ReceiveCopyBegin()
+ReceiveCopyBegin(void)
{
pq_putnchar("D", 1);
/* pq_putint(0, 4); */
static Oid AppendOid;
void
-ResetAppendOid()
+ResetAppendOid(void)
{
AppendOid = InvalidOid;
}
}
Oid
-GetAppendOid()
+GetAppendOid(void)
{
if (AppendOid == MULTI_TUPLE_APPEND)
return InvalidOid;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.16 1996/11/10 02:25:15 bryanh Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.17 1996/11/10 03:02:50 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
#include "tcop/tcopprot.h" /* where declarations for this file go */
#include "optimizer/planner.h"
+#include "tcop/tcopprot.h"
#include "tcop/tcopdebug.h"
#include "executor/execdebug.h"
*/
if (IsUnderPostmaster == false) {
puts("\nPOSTGRES backend interactive interface");
- puts("$Revision: 1.16 $ $Date: 1996/11/10 02:25:15 $");
+ puts("$Revision: 1.17 $ $Date: 1996/11/10 03:02:50 $");
}
/* ----------------
struct timeval Save_t;
void
-ResetUsage()
+ResetUsage(void)
{
struct timezone tz;
getrusage(RUSAGE_SELF, &Save_r);
}
void
-ShowUsage()
+ShowUsage(void)
{
struct timeval user, sys;
struct timeval elapse_t;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.4 1996/11/08 05:59:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.5 1996/11/10 03:02:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* ----------------------------------------------------------------
*/
EState *
-CreateExecutorState()
+CreateExecutorState(void)
{
EState *state;
extern int NBuffers;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.5 1996/11/06 10:30:36 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.6 1996/11/10 03:03:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
}
Acl *
-acldefault()
+acldefault(void)
{
Acl *acl;
AclItem *aip;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayutils.c,v 1.2 1996/11/06 06:49:41 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayutils.c,v 1.3 1996/11/10 03:03:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
+#include "utils/array.h"
+
int
GetOffset(int n, int dim[], int lb[], int indx[])
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.3 1996/11/06 10:30:44 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.4 1996/11/10 03:03:05 momjian Exp $
*
* NOTES
* This code is actually (almost) unused.
* time with precision up to microsecs.) - ay 3/95
*/
text *
-timeofday()
+timeofday(void)
{
#ifndef WIN32
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/datetimes.c,v 1.5 1996/11/06 06:49:45 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/datetimes.c,v 1.6 1996/11/10 03:03:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include <string.h>
#include <postgres.h>
-#include <utils/palloc.h>
-
-/* these things look like structs, but we pass them by value so be careful
- For example, passing an int -> DateADT is not portable! */
-typedef struct DateADT {
- char day;
- char month;
- short year;
-} DateADT;
-
-typedef struct TimeADT {
- short hr;
- short min;
- float sec;
-} TimeADT;
-
+#include <utils/builtins.h>
+#include <utils/datetime.h>
static int day_tab[2][12] = {
{31,28,31,30,31,30,31,31,30,31,30,31},
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/geo-selfuncs.c,v 1.1.1.1 1996/07/09 06:22:04 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/geo-selfuncs.c,v 1.2 1996/11/10 03:03:13 momjian Exp $
*
* XXX These are totally bogus.
*
#include "access/attnum.h"
#include "utils/geo-decls.h" /* where function declarations go */
#include "utils/palloc.h"
+#include "utils/builtins.h"
float64
areasel(Oid opid,
#include "utils/palloc.h"
#include "utils/builtins.h" /* where the function declarations go */
-int like(char *text, char *p);
-
/*
* interface routines called by the function manager
*/
}
-/* $Revision: 1.3 $
+/* $Revision: 1.4 $
** "like.c" A first attempt at a LIKE operator for Postgres95.
**
** Originally written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986.
/*-------------------------------------------------------------------------
*
- * char.c--
+ * varchar.c--
* Functions for the built-in type char() and varchar().
*
* Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.5 1996/11/06 06:50:06 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.6 1996/11/10 03:03:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include <stdio.h> /* for sprintf() */
#include <string.h>
#include "postgres.h"
-#include "utils/palloc.h"
+#include "utils/builtins.h"
/*
* CHAR() and VARCHAR() types are part of the ANSI SQL standard. CHAR()
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.3 1996/11/06 10:31:22 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.4 1996/11/10 03:03:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "parser/parsetree.h" /* for getrelname() */
#include "utils/builtins.h"
#include "utils/fcache.h"
+#include "utils/fcache2.h"
#include "nodes/primnodes.h"
#include "nodes/execnodes.h"
#ifndef HAVE_MEMMOVE
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.4 1996/11/06 10:31:27 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.5 1996/11/10 03:03:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#define INITRELCACHESIZE 400
void
-RelationInitialize()
+RelationInitialize(void)
{
MemoryContext oldcxt;
HASHCTL ctl;
#define Num_indices_bootstrap 3
void
-init_irels()
+init_irels(void)
{
Size len;
int nread;
}
void
-write_irels()
+write_irels(void)
{
int len;
int nwritten;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.9 1996/11/08 05:59:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.10 1996/11/10 03:03:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef PG_STANDALONE
int
-DebugFileOpen()
+DebugFileOpen(void)
{
int fd, istty;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.5 1996/11/03 06:53:26 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.6 1996/11/10 03:03:31 momjian Exp $
*
* NOTE
* XXX this code needs improvement--check for state violations and
}
ExcProc *
-ExcGetUnCaught()
+ExcGetUnCaught(void)
{
return (ExcUnCaughtP);
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.5 1996/11/08 20:46:07 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.6 1996/11/10 03:03:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* ----------------
*/
-static int expand_table();
-static int hdefault();
-static int init_htab();
+static int expand_table(HTAB *hashp);
+static int hdefault(HTAB *hashp);
+static int init_htab(HTAB *hashp, int nelem);
/*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.3 1996/11/08 06:00:48 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.4 1996/11/10 03:03:45 momjian Exp $
*
* NOTE
* XXX This is a preliminary implementation which lacks fail-fast
}
}
+#ifdef NOT_USED
void
AllocSetReset_debug(char *file, int line, AllocSet set)
{
AllocSetFree(set, pointer);
}
}
+#endif
/*
* AllocSetContains --
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_version/Attic/pg_version.c,v 1.4 1996/11/08 06:01:17 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_version/Attic/pg_version.c,v 1.5 1996/11/10 03:04:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
return(0);
}
+void elog(void); /* make compiler happy */
+
void
elog(void) {}
+int GetDataHome(void); /* make compiler happy */
+
int
GetDataHome(void)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.26 1996/11/08 20:46:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.27 1996/11/10 03:04:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* print out usage for the backslash commands
*/
-char *on(bool f)
+static char *on(bool f)
{
return f? "on": "off";
}
fprintf(stderr,"\t \\! [<cmd>] -- shell escape or command\n");
}
-PGresult *
+static PGresult *
PSQLexec(PsqlSettings *ps, char *query)
{
PGresult *res = PQexec(ps->db, query);
-void
+static void
editFile(char *fname)
{
char *editorName;
free(sys);
}
-bool
+static bool
toggle(PsqlSettings *settings, bool *sw, char *msg)
{
*sw= !*sw;
-void
+static void
unescape(char *dest, const char *source) {
/*-----------------------------------------------------------------------------
Return as the string <dest> the value of string <source> with escape
-void
+static void
parse_slash_copy(const char *args, char *table, const int table_len,
char *file, const int file_len,
bool *from_p, bool *error_p) {
-void
+static void
do_copy(const char *args, PsqlSettings *settings) {
/*---------------------------------------------------------------------------
Execute a \copy command (frontend copy). We have to open a file, then
}
-void
+static void
do_connect(const char *new_dbname, PsqlSettings *settings) {
char *dbname=PQdb(settings->db);
}
-void
+static void
do_edit(const char *filename_arg, char *query, int *retcode_p) {
int fd;
-void
+static void
do_help(const char *topic) {
if (!topic) {
-void
+static void
do_shell(const char *command) {
if (!command) {
#ifndef GIST_H
#define GIST_H
+#include <access/funcindex.h>
+#include <access/itup.h>
+#include <access/relscan.h>
+#include <access/sdir.h>
#include <storage/page.h>
#include <storage/block.h>
#include <utils/rel.h>
{(e).pred = pr; (e).rel = r; (e).page = pg; (e).offset = o; (e).bytes = b; (e).leafkey = l;}
/* defined in gist.c */
+#define TRLOWER(tr) (((tr)->bytes))
+#define TRUPPER(tr) (&((tr)->bytes[MAXALIGN(VARSIZE(TRLOWER(tr)))]))
+
+typedef struct txtrange {
+ /* flag: NINF means that lower is negative infinity; PINF means that
+ ** upper is positive infinity. 0 means that both are numbers.
+ */
+ int32 vl_len;
+ int32 flag;
+ char bytes[2];
+} TXTRANGE;
+
+typedef struct intrange {
+ int lower;
+ int upper;
+ /* flag: NINF means that lower is negative infinity; PINF means that
+ ** upper is positive infinity. 0 means that both are numbers.
+ */
+ int flag;
+} INTRANGE;
+
+extern void gistbuild(Relation heap,
+ Relation index, int natts,
+ AttrNumber *attnum, IndexStrategy istrat,
+ uint16 pint, Datum *params,
+ FuncIndexInfo *finfo,
+ PredInfo *predInfo);
+extern InsertIndexResult gistinsert(Relation r, Datum *datum,
+ char *nulls,ItemPointer ht_ctid);
+extern void _gistdump(Relation r);
+extern char *text_range_out(TXTRANGE *r);
+extern char *int_range_out(INTRANGE *r);
extern void gistfreestack(GISTSTACK *s);
extern void initGISTstate(GISTSTATE *giststate, Relation index);
extern void gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
extern void gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
Relation r, Page pg, OffsetNumber o, int b, bool l) ;
extern StrategyNumber RelationGetGISTStrategy(Relation, AttrNumber, RegProcedure);
+
+/* gistget.c */
+extern RetrieveIndexResult gistgettuple(IndexScanDesc s, ScanDirection dir);
+extern bool gistindex_keytest(IndexTuple tuple, TupleDesc tupdesc,
+ int scanKeySize, ScanKey key, GISTSTATE *giststate,
+ Relation r, Page p, OffsetNumber offset);
+
+/* giststrat.c */
+extern bool RelationInvokeGISTStrategy(Relation r, AttrNumber attnum,
+ StrategyNumber s, Datum left, Datum right);
+
#endif /* GIST_H */
*/
#ifndef GISTSCAN_H
+#include <access/relscan.h>
#include <storage/off.h>
#include <storage/block.h>
#include <utils/rel.h>
-void gistadjscans(Relation r, int op, BlockNumber blkno, OffsetNumber offnum);
+extern IndexScanDesc gistbeginscan(Relation r, bool fromEnd,
+ uint16 nkeys, ScanKey key);
+extern void gistrescan(IndexScanDesc s, bool fromEnd, ScanKey key);
+extern void gistmarkpos(IndexScanDesc s);
+extern void gistrestrpos(IndexScanDesc s);
+extern void gistendscan(IndexScanDesc s);
+extern void gistadjscans(Relation r, int op, BlockNumber blkno, OffsetNumber offnum);
#endif /* GISTSCAN_H */
#include <access/strat.h>
#include <utils/rel.h>
-StrategyNumber
-RelationGetGISTStrategy(Relation r, AttrNumber attnum, RegProcedure proc);
-
-bool
-RelationInvokeGISTStrategy(Relation r, AttrNumber attnum, StrategyNumber s,
- Datum left, Datum right);
+extern StrategyNumber RelationGetGISTStrategy(Relation r,
+ AttrNumber attnum, RegProcedure proc);
+extern bool RelationInvokeGISTStrategy(Relation r, AttrNumber attnum,
+ StrategyNumber s, Datum left, Datum right);
#endif /* GISTSTRAT_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: hash.h,v 1.3 1996/11/05 10:37:02 scrappy Exp $
+ * $Id: hash.h,v 1.4 1996/11/10 03:04:36 momjian Exp $
*
* NOTES
* modeled after Margo Seltzer's hash implementation for unix.
extern uint32 hashchar8(char *key);
extern uint32 hashchar16(char *key);
extern uint32 hashtext(struct varlena *key);
+extern uint32 hashname(NameData *n);
/* private routines */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: heapam.h,v 1.5 1996/11/05 07:22:50 scrappy Exp $
+ * $Id: heapam.h,v 1.6 1996/11/10 03:04:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef HEAPAM_H
#define HEAPAM_H
+#include <access/htup.h>
#include <access/relscan.h>
+#include <storage/block.h>
+#include <utils/rel.h>
/* ----------------------------------------------------------------
* heap access method statistics
extern void PrintAndFreeHeapAccessStatistics(HeapAccessStatistics stats);
extern void initam(void);
+/* hio.c */
+extern void RelationPutHeapTuple(Relation relation, BlockNumber blockIndex,
+ HeapTuple tuple);
+extern void RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple);
+
#endif /* HEAPAM_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: rtree.h,v 1.2 1996/11/05 08:18:14 scrappy Exp $
+ * $Id: rtree.h,v 1.3 1996/11/10 03:04:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef RTREE_H
#define RTREE_H
+#include <access/funcindex.h>
+#include <access/itup.h>
+#include <access/relscan.h>
+#include <access/sdir.h>
#include <access/skey.h>
+#include <access/strat.h>
#include <storage/block.h>
#include <storage/off.h>
/* defined in rtree.c */
extern void freestack(RTSTACK *s);
+/* rget.c */
+extern RetrieveIndexResult rtgettuple(IndexScanDesc s, ScanDirection dir);
+
+/*
+ * RTree code.
+ * Defined in access/index-rtree/
+ */
+extern InsertIndexResult rtinsert(Relation r, Datum *datum, char *nulls,
+ ItemPointer ht_ctid);
+extern char *rtdelete(Relation r, ItemPointer tid);
+
+extern RetrieveIndexResult rtgettuple(IndexScanDesc s, ScanDirection dir);
+extern IndexScanDesc rtbeginscan(Relation r, bool fromEnd, uint16 nkeys,
+ ScanKey key);
+
+extern void rtendscan(IndexScanDesc s);
+extern void rtmarkpos(IndexScanDesc s);
+extern void rtrestrpos(IndexScanDesc s);
+extern void rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key);
+extern void rtbuild(Relation heap, Relation index, int natts,
+ AttrNumber *attnum, IndexStrategy istrat, uint16 pcount,
+ Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo);
+extern void _rtdump(Relation r);
+
+/* rtscan.c */
+extern void rtadjscans(Relation r, int op, BlockNumber blkno,
+ OffsetNumber offnum);
+/* rtstrat.h */
+extern StrategyNumber RelationGetRTStrategy(Relation r,
+ AttrNumber attnum, RegProcedure proc);
+extern bool RelationInvokeRTStrategy(Relation r, AttrNumber attnum,
+ StrategyNumber s, Datum left, Datum right);
+extern RegProcedure RTMapOperator(Relation r, AttrNumber attnum,
+ RegProcedure proc);
+
#endif /* RTREE_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: transam.h,v 1.4 1996/11/05 07:07:22 scrappy Exp $
+ * $Id: transam.h,v 1.5 1996/11/10 03:04:41 momjian Exp $
*
* NOTES
* Transaction System Version 101 now support proper oid
/*
* prototypes for functions in transam/transam.c
*/
-extern int RecoveryCheckingEnabled();
+extern int RecoveryCheckingEnabled(void);
extern void SetRecoveryCheckingEnabled(bool state);
extern bool TransactionLogTest(TransactionId transactionId, XidStatus status);
extern void TransactionLogUpdate(TransactionId transactionId,
XidStatus status);
extern AbsoluteTime TransactionIdGetCommitTime(TransactionId transactionId);
extern void TransRecover(Relation logRelation);
-extern void InitializeTransactionLog();
+extern void InitializeTransactionLog(void);
extern bool TransactionIdDidCommit(TransactionId transactionId);
extern bool TransactionIdDidAbort(TransactionId transactionId);
extern bool TransactionIdIsInProgress(TransactionId transactionId);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: xact.h,v 1.3 1996/11/05 07:15:58 scrappy Exp $
+ * $Id: xact.h,v 1.4 1996/11/10 03:04:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* extern definitions
* ----------------
*/
-extern int TransactionFlushEnabled();
+extern int TransactionFlushEnabled(void);
extern void SetTransactionFlushEnabled(bool state);
extern bool IsTransactionState(void);
extern void BeginTransactionBlock(void);
extern void EndTransactionBlock(void);
extern void AbortTransactionBlock(void);
-extern bool IsTransactionBlock();
-extern void UserAbortTransactionBlock();
+extern bool IsTransactionBlock(void);
+extern void UserAbortTransactionBlock(void);
extern TransactionId DisabledTransactionId;
/* defined in xid.c */
+extern TransactionId xidin(char *representation);
+extern char *xidout(TransactionId transactionId);
+extern bool xideq(TransactionId xid1, TransactionId xid2);
extern bool TransactionIdIsValid(TransactionId transactionId);
extern void StoreInvalidTransactionId(TransactionId *destination);
extern void TransactionIdStore(TransactionId transactionId,
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: heap.h,v 1.2 1996/11/05 11:23:43 scrappy Exp $
+ * $Id: heap.h,v 1.3 1996/11/10 03:04:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern void heap_destroy(char relname[]);
extern void heap_destroyr(Relation r);
-extern void InitTempRelList();
+extern void InitTempRelList(void);
extern void AddToTempRelList(Relation r);
extern void RemoveFromTempRelList(Relation r);
-extern void DestroyTempRels();
+extern void DestroyTempRels(void);
#endif /* HEAP_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: defrem.h,v 1.4 1996/11/10 02:27:15 bryanh Exp $
+ * $Id: defrem.h,v 1.5 1996/11/10 03:04:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern void DefineOperator(char *name, List *parameters);
extern void DefineAggregate(char *name, List *parameters);
extern void DefineType(char *name, List *parameters);
+extern void CreateFunction(ProcedureStmt *stmt, CommandDest dest);
/*
* prototypes in remove.c
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: executor.h,v 1.4 1996/11/05 08:18:34 scrappy Exp $
+ * $Id: executor.h,v 1.5 1996/11/10 03:04:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/*
* prototypes from functions in execTuples.c
*/
-extern void ResetTupleCount();
+extern void ResetTupleCount(void);
extern void DisplayTupleCount(FILE *statfp);
extern void ExecAssignNodeBaseInfo(EState *estate, CommonState *basenode,
Plan *parent);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeMergejoin.h,v 1.1 1996/08/28 07:22:22 scrappy Exp $
+ * $Id: nodeMergejoin.h,v 1.2 1996/11/10 03:05:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef NODEMERGEJOIN_H
#define NODEMERGEJOIN_H
-#if 0 /* aren't these static? */
-extern List MJFormOSortopI(List qualList, Oid sortOp);
-extern List MJFormISortopO(List qualList, Oid sortOp);
-#endif
extern bool MergeCompare(List *eqQual, List *compareQual, ExprContext *econtext);
extern void ExecMergeTupleDumpInner(ExprContext *econtext);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: dllist.h,v 1.2 1996/10/31 09:48:40 scrappy Exp $
+ * $Id: dllist.h,v 1.3 1996/11/10 03:05:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
Dlelem *dll_tail;
} Dllist;
-extern Dllist* DLNewList(); /* initialize a new list */
+extern Dllist* DLNewList(void); /* initialize a new list */
extern void DLFreeList(Dllist*); /* free up a list and all the nodes in it*/
extern Dlelem* DLNewElem(void* val);
extern void DLFreeElem(Dlelem*);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: libpq-be.h,v 1.2 1996/11/06 08:07:45 scrappy Exp $
+ * $Id: libpq-be.h,v 1.3 1996/11/10 03:05:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern void be_portalinit(void);
extern void be_portalpush(PortalEntry *entry);
extern PortalEntry *be_portalpop(void);
-extern PortalEntry *be_currentportal();
+extern PortalEntry *be_currentportal(void);
extern PortalEntry *be_newportal(void);
extern void be_typeinit(PortalEntry *entry, TupleDesc attrs,
int natts);
--- /dev/null
+/*-------------------------------------------------------------------------
+ *
+ * execnodes.h--
+ * definitions for executor state nodes
+ *
+ *
+ * Copyright (c) 1994, Regents of the University of California
+ *
+ * $Id: print.h,v 1.1 1996/11/10 03:05:23 momjian Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef PRINT_H
+#define PRINT_H
+
+#include "nodes/nodes.h"
+#include "nodes/plannodes.h"
+#include "nodes/parsenodes.h"
+#include "nodes/relation.h"
+#include "executor/tuptable.h"
+
+extern void print(void *obj);
+extern void pprint(void *obj);
+extern void print_rt(List *rtable);
+extern void print_expr(Node *expr, List *rtable);
+extern void print_keys(List *keys, List *rtable);
+extern void print_tl(List *tlist, List *rtable);
+extern void print_slot(TupleTableSlot *slot);
+extern char* plannode_type (Plan* p);
+extern void print_plan_recursive (Plan* p, Query *parsetree,
+ int indentLevel, char* label);
+extern void print_plan (Plan* p, Query* parsetree);
+
+#endif /* PRINT_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: readfuncs.h,v 1.1 1996/08/28 01:57:47 scrappy Exp $
+ * $Id: readfuncs.h,v 1.2 1996/11/10 03:05:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/*
* prototypes for functions in readfuncs.c
*/
-extern Node *parsePlanString();
+extern Node *parsePlanString(void);
#endif /* READFUNCS_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: gramparse.h,v 1.1 1996/11/08 20:46:26 momjian Exp $
+ * $Id: gramparse.h,v 1.2 1996/11/10 03:05:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#define GRAMPARSE_H /* include once only */
/* from scan.l */
-extern void init_io();
+extern void init_io(void);
/* from gram.y */
extern void parser_init(Oid *typev, int nargs);
-extern int yyparse();
+extern int yyparse(void);
#endif /* GRAMPARSE_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_query.h,v 1.5 1996/11/04 12:12:50 scrappy Exp $
+ * $Id: parse_query.h,v 1.6 1996/11/10 03:05:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#endif
Oid exprType(Node *expr);
-ParseState* makeParseState();
+ParseState* makeParseState(void);
QueryTreeList *parse_analyze(List *querytree_list);
/* define in parse_query.c, used in gram.y */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: buf_internals.h,v 1.5 1996/11/05 06:10:53 scrappy Exp $
+ * $Id: buf_internals.h,v 1.6 1996/11/10 03:05:53 momjian Exp $
*
* NOTE
* If BUFFERPAGE0 is defined, then 0 will be used as a
bool *foundPtr);
extern int WriteLocalBuffer(Buffer buffer, bool release);
extern int FlushLocalBuffer(Buffer buffer);
-extern void InitLocalBuffer();
-extern void LocalBufferSync();
-extern void ResetLocalBufferPool();
+extern void InitLocalBuffer(void);
+extern void LocalBufferSync(void);
+extern void ResetLocalBufferPool(void);
#endif /* BUFMGR_INTERNALS_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: shmem.h,v 1.2 1996/11/05 06:11:04 scrappy Exp $
+ * $Id: shmem.h,v 1.3 1996/11/10 03:05:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
} SHM_QUEUE;
/* shmem.c */
-extern void ShmemBindingTabReset();
+extern void ShmemBindingTabReset(void);
extern void ShmemCreate(unsigned int key, unsigned int size);
extern int InitShmem(unsigned int key, unsigned int size);
extern long *ShmemAlloc(unsigned long size);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: sinval.h,v 1.3 1996/11/05 06:11:05 scrappy Exp $
+ * $Id: sinval.h,v 1.4 1996/11/10 03:06:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern void CreateSharedInvalidationState(IPCKey key);
extern void AttachSharedInvalidationState(IPCKey key);
-extern void InitSharedInvalidationState();
+extern void InitSharedInvalidationState(void);
extern void RegisterSharedInvalid(int cacheId, Index hashIndex,
ItemPointer pointer);
extern void InvalidateSharedInvalid(void (*invalFunction)(),
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: smgr.h,v 1.4 1996/11/08 20:46:33 momjian Exp $
+ * $Id: smgr.h,v 1.5 1996/11/10 03:06:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* smgrtype.c */
extern char *smgrout(int2 i);
extern int2 smgrin(char *s);
+extern bool smgreq(int2 a, int2 b);
+extern bool smgrne(int2 a, int2 b);
#endif /* SMGR_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: dest.h,v 1.3 1996/11/04 12:07:00 scrappy Exp $
+ * $Id: dest.h,v 1.4 1996/11/10 03:06:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern void donothing(List *tuple, List *attrdesc);
extern void (*DestToFunction(CommandDest dest))();
extern void EndCommand(char *commandTag, CommandDest dest);
-extern void SendCopyBegin();
-extern void ReceiveCopyBegin();
+extern void SendCopyBegin(void);
+extern void ReceiveCopyBegin(void);
extern void NullCommand(CommandDest dest);
extern void BeginCommand(char *pname, int operation, TupleDesc attinfo,
bool isIntoRel, bool isIntoPortal, char *tag,
CommandDest dest);
-extern void ResetAppendOid();
+extern void ResetAppendOid(void);
extern void UpdateAppendOid(Oid newoid);
-extern Oid GetAppendOid();
+extern Oid GetAppendOid(void);
#endif /* DEST_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pquery.h,v 1.2 1996/11/04 12:07:01 scrappy Exp $
+ * $Id: pquery.h,v 1.3 1996/11/10 03:06:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
CommandDest dest);
*/
-extern EState *CreateExecutorState();
+extern EState *CreateExecutorState(void);
extern void ProcessPortal(char *portalName, Query *parseTree,
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: tcopprot.h,v 1.2 1996/11/04 12:07:04 scrappy Exp $
+ * $Id: tcopprot.h,v 1.3 1996/11/10 03:06:11 momjian Exp $
*
* OLD COMMENTS
* This file was created so that other c files could get the two
int nargs, CommandDest dest);
#endif /* BOOTSTRAP_HEADER */
-extern void handle_warn();
-extern void quickdie();
-extern void die();
+extern void handle_warn(SIGNAL_ARGS);
+extern void quickdie(SIGNAL_ARGS);
+extern void die(SIGNAL_ARGS);
extern int PostgresMain(int argc, char *argv[]);
-extern void ResetUsage();
-extern void ShowUsage();
+extern void ResetUsage(void);
+extern void ShowUsage(void);
#endif /* tcopprotIncluded */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: acl.h,v 1.3 1996/11/04 07:18:36 scrappy Exp $
+ * $Id: acl.h,v 1.4 1996/11/10 03:06:14 momjian Exp $
*
* NOTES
* For backward-compatability purposes we have to allow there
*/
extern char *aclparse(char *s, AclItem *aip, unsigned *modechg);
extern Acl *aclownerdefault(AclId ownerid);
-extern Acl *acldefault();
+extern Acl *acldefault(void);
extern Acl *aclinsert3(Acl *old_acl, AclItem *mod_aip, unsigned modechg);
extern char* aclmakepriv(char* old_privlist, char new_priv);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: builtins.h,v 1.6 1996/11/04 11:51:14 scrappy Exp $
+ * $Id: builtins.h,v 1.7 1996/11/10 03:06:18 momjian Exp $
*
* NOTES
* This should normally only be included by fmgr.h.
#include <storage/itemptr.h>
#include <utils/geo-decls.h>
+#include <utils/datetime.h>
#include <utils/nabstime.h>
#include <utils/rel.h>
* Per-opclass comparison functions for new btrees. These are
* stored in pg_amproc and defined in nbtree/
*/
-extern int32 btint2cmp();
-extern int32 btint4cmp();
-extern int32 btint24cmp();
-extern int32 btint42cmp();
-extern int32 btfloat4cmp();
-extern int32 btfloat8cmp();
-extern int32 btoidcmp();
-extern int32 btabstimecmp();
-extern int32 btcharcmp();
-extern int32 btchar16cmp();
-extern int32 bttextcmp();
-
-/*
- * RTree code.
- * Defined in access/index-rtree/
- */
-extern char *rtinsert();
-extern char *rtdelete();
-extern char *rtgettuple();
-extern char *rtbeginscan();
-extern void rtendscan();
-extern void rtreebuild();
-extern void rtmarkpos();
-extern void rtrestrpos();
-extern void rtrescan();
-extern void rtbuild();
+extern int32 btint2cmp(int16 a, int16 b);
+extern int32 btint4cmp(int32 a, int32 b);
+extern int32 btint24cmp(int16 a, int32 b);
+extern int32 btint42cmp(int32 a, int16 b);
+extern int32 btfloat4cmp(float32 a, float32 b);
+extern int32 btfloat8cmp(float64 a, float64 b);
+extern int32 btoidcmp(Oid a, Oid b);
+extern int32 btabstimecmp(AbsoluteTime a, AbsoluteTime b);
+extern int32 btcharcmp(char a, char b);
+extern int32 btchar2cmp(uint16 a, uint16 b);
+extern int32 btchar4cmp(uint32 a, uint32 b);
+extern int32 btchar8cmp(char *a, char *b);
+extern int32 btchar16cmp(char *a, char *b);
+extern int32 btnamecmp(NameData *a, NameData *b);
+extern int32 bttextcmp(struct varlena *a, struct varlena *b);
/* support routines for the rtree access method, by opclass */
-extern BOX *rt_box_union();
-extern BOX *rt_box_inter();
-extern float *rt_box_size();
-extern float *rt_bigbox_size();
-extern float *rt_poly_size();
-extern POLYGON *rt_poly_union();
-extern POLYGON *rt_poly_inter();
+extern BOX *rt_box_union(BOX *a,BOX *b);
+extern BOX *rt_box_inter(BOX *a, BOX *b);
+extern void rt_box_size(BOX *a, float *size);
+extern void rt_bigbox_size(BOX *a,float *size);
+extern void rt_poly_size(POLYGON *a, float *size);
+extern POLYGON *rt_poly_union(POLYGON *a, POLYGON *b);
+extern POLYGON *rt_poly_inter(POLYGON *a, POLYGON *b);
/* projection utilities */
/* extern char *GetAttributeByName();
extern AbsoluteTime intervalstart(TimeInterval i);
extern AbsoluteTime intervalend(TimeInterval i);
extern int isreltime(char *timestring, int *sign, long *quantity, int *unitnr);
+extern text *timeofday(void);
/* dt.c */
extern int32 dtin(char *datetime);
/* misc.c */
extern bool NullValue(Datum value, bool *isNull);
extern bool NonNullValue(Datum value, bool *isNull);
+extern bool oidrand(Oid o, int32 X);
+extern bool oidsrand(int32 X);
extern int32 userfntest(int i);
/* not_in.c */
extern int32 oideq(Oid arg1, Oid arg2);
extern int32 oidne(Oid arg1, Oid arg2);
extern int32 oid8eq(Oid arg1[], Oid arg2[]);
+extern bool oideqint4(Oid arg1, int32 arg2);
+extern bool int4eqoid(int32 arg1, Oid arg2);
/* regexp.c */
extern bool char2regexeq(uint16 arg1, struct varlena *p);
extern bool char8regexne(char *s, struct varlena *p);
extern bool char16regexeq(char *s, struct varlena *p);
extern bool char16regexne(char *s, struct varlena *p);
+extern bool nameregexeq(NameData *n, struct varlena *p);
+extern bool nameregexne(NameData *s, struct varlena *p);
extern bool textregexeq(struct varlena *s, struct varlena *p);
extern bool textregexne(struct varlena *s, struct varlena *p);
extern bool char2icregexeq(uint16 arg1, struct varlena *p);
extern float64 hashnpage(Oid operatorOid, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid);
extern float64 rtsel(Oid operatorOid, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid);
extern float64 rtnpage(Oid operatorOid, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid);
+extern float64 gistsel(Oid operatorObjectId, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid);
+extern float64 gistnpage(Oid operatorObjectId, Oid indrelid, AttrNumber attributeNumber, char *constValue, int32 constFlag, int32 nIndexKeys, Oid indexrelid);
/* tid.c */
extern ItemPointer tidin(char *str);
extern char *tidout(ItemPointer itemPtr);
+/* varchar.c */
+extern char *bpcharin(char *s, int dummy, int typlen);
+extern char *bpcharout(char *s);
+extern char *varcharin(char *s, int dummy, int typlen);
+extern char *varcharout(char *s);
+extern int32 bpchareq(char *arg1, char *arg2);
+extern int32 bpcharne(char *arg1, char *arg2);
+extern int32 bpcharlt(char *arg1, char *arg2);
+extern int32 bpcharle(char *arg1, char *arg2);
+extern int32 bpchargt(char *arg1, char *arg2);
+extern int32 bpcharge(char *arg1, char *arg2);
+extern int32 bpcharcmp(char *arg1, char *arg2);
+extern int32 varchareq(char *arg1, char *arg2);
+extern int32 varcharne(char *arg1, char *arg2);
+extern int32 varcharlt(char *arg1, char *arg2);
+extern int32 varcharle(char *arg1, char *arg2);
+extern int32 varchargt(char *arg1, char *arg2);
+extern int32 varcharge(char *arg1, char *arg2);
+extern int32 varcharcmp(char *arg1, char *arg2);
+extern uint32 hashbpchar(struct varlena *key);
+extern uint32 hashvarchar(struct varlena *key);
/* varlena.c */
extern struct varlena *byteain(char *inputText);
extern char *byteaout(struct varlena *vlena);
extern struct varlena *textin(char *inputText);
extern char *textout(struct varlena *vlena);
+extern int textlen (text* t);
+extern text *textcat(text* t1, text* t2);
extern int32 texteq(struct varlena *arg1, struct varlena *arg2);
extern int32 textne(struct varlena *arg1, struct varlena *arg2);
extern int32 text_lt(struct varlena *arg1, struct varlena *arg2);
extern struct varlena *byteaSetByte(struct varlena *v, int32 n, int32 newByte);
extern struct varlena *byteaSetBit(struct varlena *v, int32 n, int32 newBit);
+/* datetimes.c */
+extern int4 date_in(char *datestr);
+extern char *date_out(int4 dateVal);
+extern int date_eq(int4 dateVal1, int4 dateVal2);
+extern int date_ne(int4 dateVal1, int4 dateVal2);
+extern int date_lt(int4 dateVal1, int4 dateVal2);
+extern int date_le(int4 dateVal1, int4 dateVal2);
+extern int date_gt(int4 dateVal1, int4 dateVal2);
+extern int date_ge(int4 dateVal1, int4 dateVal2);
+extern int date_cmp(int4 dateVal1, int4 dateVal2);
+extern char *time_in(char *timestr);
+extern char *time_out(TimeADT *time);
+extern int time_eq(TimeADT *time1, TimeADT *time2);
+extern int time_ne(TimeADT *time1, TimeADT *time2);
+extern int time_lt(TimeADT *time1, TimeADT *time2);
+extern int time_le(TimeADT *time1, TimeADT *time2);
+extern int time_gt(TimeADT *time1, TimeADT *time2);
+extern int time_ge(TimeADT *time1, TimeADT *time2);
+extern int time_cmp(TimeADT *time1, TimeADT *time2);
+extern int32 int42reltime(int32 timevalue);
+
+/* like.c */
+extern bool char2like(uint16 arg1, struct varlena *p);
+extern bool char2nlike(uint16 arg1, struct varlena *p);
+extern bool char4like(uint32 arg1, struct varlena *p);
+extern bool char4nlike(uint32 arg1, struct varlena *p);
+extern bool char8like(char *s, struct varlena *p);
+extern bool char8nlike(char *s, struct varlena *p);
+extern bool char16like(char *s, struct varlena *p);
+extern bool char16nlike(char *s, struct varlena *p);
+extern bool namelike(NameData *n, struct varlena *p);
+extern bool namenlike(NameData *s, struct varlena *p);
+extern bool textlike(struct varlena *s, struct varlena *p);
+extern bool textnlike(struct varlena *s, struct varlena *p);
+extern int like(char *text, char *p);
+
/* acl.c */
#endif /* BUILTINS_H */
--- /dev/null
+/*-------------------------------------------------------------------------
+ *
+ * datetime.h--
+ * Definitions for the datetime
+ *
+ *
+ * Copyright (c) 1994, Regents of the University of California
+ *
+ * $Id: datetime.h,v 1.1 1996/11/10 03:06:21 momjian Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef DATETIME_H
+#define DATETIME_H
+
+/* these things look like structs, but we pass them by value so be careful
+ For example, passing an int -> DateADT is not portable! */
+typedef struct DateADT {
+ char day;
+ char month;
+ short year;
+} DateADT;
+
+typedef struct TimeADT {
+ short hr;
+ short min;
+ float sec;
+} TimeADT;
+
+#endif /* DATETIME_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: elog.h,v 1.2 1996/11/06 10:15:25 scrappy Exp $
+ * $Id: elog.h,v 1.3 1996/11/10 03:06:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern void elog(int lev, const char *fmt, ...);
#ifndef PG_STANDALONE
-int DebugFileOpen();
+int DebugFileOpen(void);
#endif
#endif /* ELOG_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: exc.h,v 1.3 1996/11/04 04:00:47 momjian Exp $
+ * $Id: exc.h,v 1.4 1996/11/10 03:06:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern void EnableExceptionHandling(bool on);
extern void ExcPrint(Exception *excP, ExcDetail detail, ExcData data,
ExcMessage message);
-extern ExcProc *ExcGetUnCaught();
+extern ExcProc *ExcGetUnCaught(void);
extern ExcProc *ExcSetUnCaught(ExcProc *newP);
extern void ExcUnCaught(Exception *excP, ExcDetail detail, ExcData data,
ExcMessage message);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: fmgrtab.h,v 1.3 1996/11/04 11:51:17 scrappy Exp $
+ * $Id: fmgrtab.h,v 1.4 1996/11/10 03:06:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern FmgrCall *fmgr_isbuiltin(Oid id);
extern func_ptr fmgr_lookupByName(char* name);
+extern void load_file(char *filename);
#endif /* FMGRTAB_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geo-decls.h,v 1.3 1996/11/04 07:46:04 scrappy Exp $
+ * $Id: geo-decls.h,v 1.4 1996/11/10 03:06:32 momjian Exp $
*
* NOTE
* These routines do *not* use the float types from adt/.
#ifndef GEO_DECLS_H
#define GEO_DECLS_H
+#include "access/attnum.h"
+
/*#ifndef FmgrIncluded -- seems like always included. (it's FMgrIncluded) AY */
/*--------------------------------------------------------------------
extern long poly_contained(POLYGON *polya, POLYGON *polyb);
/* geo-selfuncs.c */
-#if 0 /* FIX ME! */
-extern float64 areasel(Oid opid, Oid relid, AttrNumber attno, char *value, int32 flag);
-extern float64 areajoinsel(Oid opid, Oid relid, AttrNumber attno, char *value, int32 flag);
-extern float64 leftsel(Oid opid, Oid relid, AttrNumber attno, char *value, int32 flag);
-extern float64 leftjoinsel(Oid opid, Oid relid, AttrNumber attno, char *value, int32 flag);
-extern float64 contsel(Oid opid, Oid relid, AttrNumber attno, char *value, int32 flag);
-extern float64 contjoinsel(Oid opid, Oid relid, AttrNumber attno, char *value, int32 flag);
-#endif
+extern float64 areasel(Oid opid, Oid relid, AttrNumber attno,
+ char *value, int32 flag);
+extern float64 areajoinsel(Oid opid, Oid relid, AttrNumber attno,
+ char *value, int32 flag);
+extern float64 leftsel(Oid opid, Oid relid, AttrNumber attno,
+ char *value, int32 flag);
+extern float64 leftjoinsel(Oid opid, Oid relid, AttrNumber attno,
+ char *value, int32 flag);
+extern float64 contsel(Oid opid, Oid relid, AttrNumber attno,
+ char *value, int32 flag);
+extern float64 contjoinsel(Oid opid, Oid relid, AttrNumber attno,
+ char *value, int32 flag);
#endif /* GEO_DECLS_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: relcache.h,v 1.3 1996/11/04 11:51:26 scrappy Exp $
+ * $Id: relcache.h,v 1.4 1996/11/10 03:06:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern void RelationRegisterRelation(Relation relation);
extern void RelationPurgeLocalRelation(bool xactComitted);
-extern void RelationInitialize();
-extern void init_irels();
-extern void write_irels();
+extern void RelationInitialize(void);
+extern void init_irels(void);
+extern void write_irels(void);
#endif /* RELCACHE_H */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.16 1996/11/10 01:46:14 bryanh Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.17 1996/11/10 03:06:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
+#include <ctype.h>
#include <string.h>
#include <netdb.h>
#include <errno.h>
static void closePGconn(PGconn *conn);
static int conninfo_parse(const char *conninfo, char *errorMessage);
static char *conninfo_getval(char *keyword);
-static void conninfo_free();
+static void conninfo_free(void);
#define NOTIFYLIST_INITIAL_SIZE 10
#define NOTIFYLIST_GROWBY 10
* ----------------
*/
PQconninfoOption*
-PQconndefaults()
+PQconndefaults(void)
{
char errorMessage[ERROR_MSG_LENGTH];
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: libpq-fe.h,v 1.10 1996/11/09 10:39:54 scrappy Exp $
+ * $Id: libpq-fe.h,v 1.11 1996/11/10 03:06:38 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* === in fe-connect.c === */
/* make a new client connection to the backend */
extern PGconn* PQconnectdb(const char* conninfo);
-extern PQconninfoOption *PQconndefaults();
+extern PQconninfoOption *PQconndefaults(void);
extern PGconn* PQsetdb(const char* pghost, const char* pgport, const char* pgoptions,
const char* pgtty, const char* dbName);
/* close the current connection and free the PGconn data structure */