All external function definitions now have prototypes that are checked.

This commit is contained in:
Bruce Momjian 1996-11-10 03:06:38 +00:00
parent bf5cbbf789
commit aaeef4d17d
99 changed files with 551 additions and 322 deletions

View File

@ -7,7 +7,7 @@
#
#
# 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
@ -860,7 +860,7 @@ includedir= $(HEADERDIR)
# 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.

View File

@ -8,7 +8,7 @@
*
*
* 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
@ -19,6 +19,7 @@
#include <postgres.h>
#include <access/heapam.h>
#include <access/htup.h>
#include <access/transam.h>
#include <access/tupmacs.h>

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -16,6 +16,7 @@
#include <fmgr.h>
#include <access/heaptuple.h>
#include <access/valid.h>
#include <access/xact.h>
#include <storage/bufpage.h>
#include <utils/rel.h>

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -15,6 +15,7 @@
#include <postgres.h>
#include <access/htup.h>
#include <access/iqual.h>
#include <access/itup.h>
#include <access/skey.h>
#include <executor/execdebug.h>

View File

@ -8,7 +8,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -17,6 +17,7 @@
#include <fmgr.h>
#include <access/heaptuple.h>
#include <access/printtup.h>
#include <catalog/pg_type.h>
#include <libpq/libpq.h>
#include <utils/syscache.h>

View File

@ -1190,9 +1190,6 @@ gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, Relation r,
#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
@ -1236,7 +1233,7 @@ _gistdump(Relation r)
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);
@ -1247,26 +1244,6 @@ _gistdump(Relation r)
}
}
#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;

View File

@ -13,6 +13,7 @@
#include <postgres.h>
#include <access/gist.h>
#include <access/gistscan.h>
#include <access/genam.h>
#include <access/rtree.h>
#include <storage/bufmgr.h>

View File

@ -7,7 +7,7 @@
*
*
* 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
@ -18,6 +18,8 @@
#include "postgres.h"
#include "access/hash.h"
uint32 hashint2(int16 key)
{
return ((uint32) ~key);

View File

@ -7,7 +7,7 @@
*
*
* 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.
@ -324,7 +324,7 @@ PrintAndFreeHeapAccessStatistics(HeapAccessStatistics stats)
* ----------------
*/
void
initam()
initam(void)
{
/* ----------------
* initialize heap statistics.

View File

@ -7,7 +7,7 @@
*
*
* 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
@ -24,6 +24,7 @@
#include <postgres.h>
#include <utils/builtins.h>
#include <utils/nabstime.h>
int32

View File

@ -7,13 +7,14 @@
*
*
* 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>

View File

@ -7,7 +7,7 @@
*
*
* 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
@ -96,7 +96,7 @@ extern bool BuildingBtree;
* ----------------
*/
int
RecoveryCheckingEnabled()
RecoveryCheckingEnabled(void)
{
return RecoveryCheckingEnableState;
}
@ -453,7 +453,7 @@ TransRecover(Relation logRelation)
* Initializes transaction logging.
*/
void
InitializeTransactionLog()
InitializeTransactionLog(void)
{
Relation logRelation;
Relation timeRelation;

View File

@ -7,7 +7,7 @@
*
*
* 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:
@ -218,7 +218,7 @@ bool AMI_OVERRIDE = false;
static int TransactionFlushState = 1;
int
TransactionFlushEnabled()
TransactionFlushEnabled(void)
{
return TransactionFlushState;
}
@ -237,7 +237,7 @@ SetTransactionFlushEnabled(bool state)
* --------------------------------
*/
bool
IsTransactionState()
IsTransactionState(void)
{
TransactionState s = CurrentTransactionState;
@ -1113,7 +1113,7 @@ AbortCurrentTransaction()
* --------------------------------
*/
void
BeginTransactionBlock()
BeginTransactionBlock(void)
{
TransactionState s = CurrentTransactionState;
@ -1151,7 +1151,7 @@ BeginTransactionBlock()
* --------------------------------
*/
void
EndTransactionBlock()
EndTransactionBlock(void)
{
TransactionState s = CurrentTransactionState;
@ -1205,7 +1205,7 @@ EndTransactionBlock()
* --------------------------------
*/
void
AbortTransactionBlock()
AbortTransactionBlock(void)
{
TransactionState s = CurrentTransactionState;

View File

@ -7,7 +7,7 @@
*
*
* 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
@ -23,6 +23,7 @@
#include <stdio.h>
#include <postgres.h>
#include <access/xact.h>
extern TransactionId NullTransactionId;
extern TransactionId DisabledTransactionId;

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -37,6 +37,7 @@ relpath(char relname[])
return(relname);
}
#ifdef NOT_USED
/*
* issystem - returns non-zero iff relname is a system catalog
*
@ -56,6 +57,7 @@ issystem(char relname[])
else
return FALSE;
}
#endif
/*
* IsSystemRelationName --

View File

@ -7,7 +7,7 @@
*
*
* 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
@ -26,27 +26,27 @@
*/
#include <postgres.h>
#include <miscadmin.h>
#include <fmgr.h>
#include <access/heapam.h>
#include <catalog/catalog.h>
#include <catalog/catname.h>
#include <catalog/heap.h>
#include <catalog/index.h>
#include <catalog/indexing.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 <access/heapam.h>
#include <utils/mcxt.h>
#include <parser/catalog_utils.h>
#include <catalog/index.h>
#include <fmgr.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
@ -1342,7 +1342,7 @@ heap_destroyr(Relation rdesc)
*/
void
InitTempRelList()
InitTempRelList(void)
{
if (tempRels) {
free(tempRels->rels);
@ -1402,7 +1402,7 @@ AddToTempRelList(Relation r)
go through the tempRels list and destroy each of the relations
*/
void
DestroyTempRels()
DestroyTempRels(void)
{
int i;
Relation rdesc;

View File

@ -6,7 +6,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -33,6 +33,7 @@
#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')

View File

@ -9,7 +9,7 @@
*
*
* 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
@ -59,7 +59,7 @@ static int defGetTypeLength(DefElem *def);
#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,
@ -77,7 +77,7 @@ case_translate_language_name(const char *input, char *output) {
void
static void
compute_return_type(const Node *returnType,
char **prorettype_p, bool *returnsSet_p) {
/*---------------------------------------------------------------------------
@ -98,7 +98,7 @@ compute_return_type(const Node *returnType,
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) {
@ -157,7 +157,7 @@ compute_full_attributes(const List *parameters, int32 *byte_pct_p,
void
static void
interpret_AS_clause(const char languageName[], const char as[],
char **prosrc_str_p, char **probin_str_p) {

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -21,6 +21,7 @@
#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>

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -27,6 +27,7 @@
#include <rewrite/rewriteManip.h>
#include <rewrite/rewriteRemove.h>
#include <commands/creatinh.h>
#include <commands/view.h>
/*---------------------------------------------------------------------
* DefineVirtualRelation

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -81,7 +81,7 @@ extern int NIndexTupleProcessed; /* have to be defined in the access
* ----------------------------------------------------------------
*/
void
ResetTupleCount()
ResetTupleCount(void)
{
NTupleProcessed = 0;
NTupleRetrieved = 0;

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -201,7 +201,7 @@ MJFormOSortopI(List *qualList, Oid sortOp)
* by "sortOp" and reversing the positions of the keys.
* ----------------------------------------------------------------
*/
List *
static List *
MJFormISortopO(List *qualList, Oid sortOp)
{
List *ISortopO;

View File

@ -15,7 +15,7 @@
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -210,7 +210,7 @@ ExecCountSlotsTee(Tee *node)
because the left and right scans may be at different points
* ----------------------------------------------------------------
*/
void
static void
initTeeScanDescs(Tee* node)
{
TeeState *teeState;

View File

@ -9,7 +9,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -19,7 +19,7 @@
#include <lib/dllist.h>
Dllist*
DLNewList()
DLNewList(void)
{
Dllist* l;

View File

@ -8,7 +8,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -61,7 +61,7 @@ static Dllist *be_portalstack;
* ----------------
*/
void
be_portalinit()
be_portalinit(void)
{
be_portalstack = DLNewList();
}
@ -85,7 +85,7 @@ be_portalpush(PortalEntry *entry)
* ----------------
*/
PortalEntry *
be_portalpop()
be_portalpop(void)
{
PortalEntry *p;
Dlelem* elt;
@ -105,7 +105,7 @@ be_portalpop()
* ----------------
*/
PortalEntry *
be_currentportal()
be_currentportal(void)
{
Dlelem* elt;
elt = DLGetTail(be_portalstack);
@ -128,7 +128,7 @@ static Oid be_portaloid;
static u_int be_portalcnt = 0;
PortalEntry *
be_newportal()
be_newportal(void)
{
PortalEntry *entry;
char buf[PortalNameLength];

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -59,7 +59,7 @@ enum Userauth {Trust, Ident};
/* 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 */);
}

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -87,7 +87,8 @@ _equalExpr(Expr *a, Expr *b)
return (true);
}
bool _equalIter(Iter *a, Iter *b)
static bool
_equalIter(Iter *a, Iter *b)
{
return (equal(a->iterexpr, b->iterexpr));
}

View File

@ -7,7 +7,7 @@
*
*
* 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
@ -52,7 +52,7 @@ static void _outNode(StringInfo str, void *obj);
* _outIntList -
* converts a List of integers
*/
void
static void
_outIntList(StringInfo str, List *list)
{
List *l;

View File

@ -7,7 +7,7 @@
*
*
* 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
@ -24,6 +24,7 @@
#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"
@ -377,3 +378,4 @@ print_plan (Plan* p, Query* parsetree)
}

View File

@ -7,7 +7,7 @@
*
*
* 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
@ -1788,7 +1788,7 @@ _readIter()
* ----------------
*/
Node *
parsePlanString()
parsePlanString(void)
{
char *token;
int length;

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -236,6 +236,7 @@ find_join_paths(Query *root, List *outer_rels, int levels_left)
*
*****************************************************************************/
#ifdef OPTIMIZER_DEBUG
static void
print_joinclauses(Query *root, List *clauses)
{
@ -250,7 +251,7 @@ print_joinclauses(Query *root, List *clauses)
}
}
void
static void
print_path(Query *root, Path *path, int indent)
{
char *ptype = NULL;
@ -330,7 +331,6 @@ print_path(Query *root, Path *path, int indent)
}
}
#ifdef OPTIMIZER_DEBUG
static void
debug_print_rel(Query *root, Rel *rel)
{

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -16,6 +16,7 @@
#include "nodes/relation.h"
#include "optimizer/internal.h"
#include "optimizer/joininfo.h"
#include "optimizer/var.h"
#include "optimizer/clauses.h"

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -89,7 +89,8 @@ static void parseCheckAggregates(ParseState *pstate, Query *qry);
*/
ParseState*
makeParseState() {
makeParseState(void)
{
ParseState *pstate;
pstate = malloc(sizeof(ParseState));

View File

@ -6,7 +6,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -83,10 +83,6 @@ static char *attnum_type[SPECIALS] = {
#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
@ -108,6 +104,10 @@ typedef struct _CandidateList {
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
@ -241,7 +241,7 @@ tbyvalue(Type t)
}
/* given a type, return its typetype ('c' for 'c'atalog types) */
char
static char
typetypetype(Type t)
{
TypeTupleForm typ;

View File

@ -6,7 +6,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -118,7 +118,6 @@ fixupsets(Query *parse)
return;
define_sets(parse);
}
#endif
#ifdef SETS_FIXED
/* Recursively find all of the Consts in the parsetree. Some of
@ -175,8 +174,8 @@ define_sets(Node *clause)
define_sets(get_leftop (clause));
define_sets(get_rightop (clause));
}
#endif
}
#endif
#define PSIZE(PTR) (*((int32 *)(PTR) - 1))
Node *

View File

@ -10,7 +10,7 @@
*
*
* 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
*
@ -982,7 +982,7 @@ BackendStartup(StartupInfo *packet, /* client's startup packet */
* 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;

View File

@ -6,7 +6,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -26,7 +26,7 @@
* 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)

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -25,6 +25,7 @@
#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"

View File

@ -6,7 +6,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -21,6 +21,7 @@
#include "utils/lsyscache.h"
#include "utils/builtins.h"
#include "rewrite/rewriteHandler.h"
#include "rewrite/rewriteManip.h"
#include "rewrite/rewriteSupport.h"
#include "rewrite/locks.h"

View File

@ -8,7 +8,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -257,11 +257,12 @@ DBG_FreeListCheck(int nfree)
}
}
#ifdef NOT_USED
/*
* PrintBufferFreeList -
* prints the buffer free list, for debugging
*/
void
static void
PrintBufferFreeList()
{
BufferDesc *buf;
@ -285,3 +286,5 @@ PrintBufferFreeList()
buf = &(BufferDescriptors[buf->freeNext]);
}
}
#endif

View File

@ -15,7 +15,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -38,6 +38,7 @@
#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"
@ -205,7 +206,7 @@ FlushLocalBuffer(Buffer buffer)
* buffer until we need it.
*/
void
InitLocalBuffer()
InitLocalBuffer(void)
{
int i;
@ -241,7 +242,7 @@ InitLocalBuffer()
* we will not need these buffers again.
*/
void
LocalBufferSync()
LocalBufferSync(void)
{
int i;
@ -269,7 +270,7 @@ LocalBufferSync()
}
void
ResetLocalBufferPool()
ResetLocalBufferPool(void)
{
int i;

View File

@ -7,7 +7,7 @@
*
*
* 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
*
@ -66,7 +66,7 @@ static struct ONEXIT {
} onexit_list[ MAX_ON_EXITS ];
static int onexit_index;
static void IpcConfigTip();
static void IpcConfigTip(void);
typedef struct _PrivateMemStruct {
int id;
@ -725,7 +725,7 @@ LockIsFree(int lockid)
#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");

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -48,6 +48,8 @@
#if defined(HAS_TEST_AND_SET)
extern int tas(slock_t *lock);
#if defined (next)
/*
* NEXTSTEP (mach)
@ -163,9 +165,7 @@ S_LOCK_FREE(slock_t *lock)
#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)
@ -227,9 +227,6 @@ S_INIT_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.
@ -389,6 +386,7 @@ S_INIT_LOCK(unsigned char *addr)
defined(bsdi_2_1) || \
defined(linux)
int
tas(slock_t *m)
{

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -98,7 +98,7 @@ static HTAB *BindingTable = NULL;
* ----------------------
*/
void
ShmemBindingTabReset()
ShmemBindingTabReset(void)
{
BindingTable = (HTAB *)NULL;
}

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -75,7 +75,7 @@ AttachSharedInvalidationState(IPCKey key)
}
void
InitSharedInvalidationState()
InitSharedInvalidationState(void)
{
SpinAcquire(SInvalLock);
if (!SIBackendInit(shmInvalBuffer))

View File

@ -8,7 +8,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -61,8 +61,9 @@
#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);

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -135,7 +135,7 @@ EndCommand(char *commandTag, CommandDest dest)
*
*/
void
SendCopyBegin()
SendCopyBegin(void)
{
pq_putnchar("B", 1);
/* pq_putint(0, 4); */
@ -143,7 +143,7 @@ SendCopyBegin()
}
void
ReceiveCopyBegin()
ReceiveCopyBegin(void)
{
pq_putnchar("D", 1);
/* pq_putint(0, 4); */
@ -316,7 +316,7 @@ BeginCommand(char *pname,
static Oid AppendOid;
void
ResetAppendOid()
ResetAppendOid(void)
{
AppendOid = InvalidOid;
}
@ -345,7 +345,7 @@ UpdateAppendOid(Oid newoid)
}
Oid
GetAppendOid()
GetAppendOid(void)
{
if (AppendOid == MULTI_TUPLE_APPEND)
return InvalidOid;

View File

@ -7,7 +7,7 @@
*
*
* 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
@ -54,6 +54,7 @@
#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"
@ -1256,7 +1257,7 @@ PostgresMain(int argc, char *argv[])
*/
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 $");
}
/* ----------------
@ -1464,7 +1465,7 @@ struct rusage Save_r;
struct timeval Save_t;
void
ResetUsage()
ResetUsage(void)
{
struct timezone tz;
getrusage(RUSAGE_SELF, &Save_r);
@ -1474,7 +1475,7 @@ ResetUsage()
}
void
ShowUsage()
ShowUsage(void)
{
struct timeval user, sys;
struct timeval elapse_t;

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -65,7 +65,7 @@ CreateQueryDesc(Query *parsetree,
* ----------------------------------------------------------------
*/
EState *
CreateExecutorState()
CreateExecutorState(void)
{
EState *state;
extern int NBuffers;

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -325,7 +325,7 @@ aclownerdefault(AclId ownerid)
}
Acl *
acldefault()
acldefault(void)
{
Acl *acl;
AclItem *aip;

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -16,6 +16,8 @@
#include "postgres.h"
#include "utils/array.h"
int
GetOffset(int n, int dim[], int lb[], int indx[])
{

View File

@ -9,7 +9,7 @@
*
*
* 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.
@ -852,7 +852,7 @@ static int istinterval(char *i_string,
* time with precision up to microsecs.) - ay 3/95
*/
text *
timeofday()
timeofday(void)
{
#ifndef WIN32

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -15,22 +15,8 @@
#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},

View File

@ -8,7 +8,7 @@
*
*
* 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.
*
@ -19,6 +19,7 @@
#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,

View File

@ -22,8 +22,6 @@
#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
*/
@ -142,7 +140,7 @@ bool textnlike(struct varlena *s, struct varlena *p)
}
/* $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.

View File

@ -1,20 +1,20 @@
/*-------------------------------------------------------------------------
*
* 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()

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -26,6 +26,7 @@
#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

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -1447,7 +1447,7 @@ RelationPurgeLocalRelation(bool xactCommitted)
#define INITRELCACHESIZE 400
void
RelationInitialize()
RelationInitialize(void)
{
MemoryContext oldcxt;
HASHCTL ctl;
@ -1536,7 +1536,7 @@ RelationInitialize()
#define Num_indices_bootstrap 3
void
init_irels()
init_irels(void)
{
Size len;
int nread;
@ -1676,7 +1676,7 @@ init_irels()
}
void
write_irels()
write_irels(void)
{
int len;
int nwritten;

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -196,7 +196,7 @@ elog(int lev, const char *fmt, ... )
#ifndef PG_STANDALONE
int
DebugFileOpen()
DebugFileOpen(void)
{
int fd, istty;

View File

@ -7,7 +7,7 @@
*
*
* 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
@ -135,7 +135,7 @@ ExcPrint(Exception *excP,
}
ExcProc *
ExcGetUnCaught()
ExcGetUnCaught(void)
{
return (ExcUnCaughtP);
}

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -122,9 +122,9 @@ DynaHashFree(Pointer ptr)
* ----------------
*/
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);
/*

View File

@ -7,7 +7,7 @@
*
*
* 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
@ -128,6 +128,7 @@ AllocSetReset(AllocSet set)
}
}
#ifdef NOT_USED
void
AllocSetReset_debug(char *file, int line, AllocSet set)
{
@ -139,6 +140,7 @@ AllocSetReset_debug(char *file, int line, AllocSet set)
AllocSetFree(set, pointer);
}
}
#endif
/*
* AllocSetContains --

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -30,9 +30,13 @@ main(int argc, char **argv)
return(0);
}
void elog(void); /* make compiler happy */
void
elog(void) {}
int GetDataHome(void); /* make compiler happy */
int
GetDataHome(void)
{

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -124,7 +124,7 @@ usage(char *progname)
* print out usage for the backslash commands
*/
char *on(bool f)
static char *on(bool f)
{
return f? "on": "off";
}
@ -159,7 +159,7 @@ slashUsage(PsqlSettings *ps)
fprintf(stderr,"\t \\! [<cmd>] -- shell escape or command\n");
}
PGresult *
static PGresult *
PSQLexec(PsqlSettings *ps, char *query)
{
PGresult *res = PQexec(ps->db, query);
@ -554,7 +554,7 @@ SendQuery(bool *success_p, PsqlSettings *settings, const char *query,
void
static void
editFile(char *fname)
{
char *editorName;
@ -573,7 +573,7 @@ editFile(char *fname)
free(sys);
}
bool
static bool
toggle(PsqlSettings *settings, bool *sw, char *msg)
{
*sw= !*sw;
@ -584,7 +584,7 @@ toggle(PsqlSettings *settings, bool *sw, char *msg)
void
static void
unescape(char *dest, const char *source) {
/*-----------------------------------------------------------------------------
Return as the string <dest> the value of string <source> with escape
@ -633,7 +633,7 @@ unescape(char *dest, const char *source) {
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) {
@ -695,7 +695,7 @@ parse_slash_copy(const char *args, char *table, const int table_len,
void
static void
do_copy(const char *args, PsqlSettings *settings) {
/*---------------------------------------------------------------------------
Execute a \copy command (frontend copy). We have to open a file, then
@ -755,7 +755,7 @@ do_copy(const char *args, PsqlSettings *settings) {
}
void
static void
do_connect(const char *new_dbname, PsqlSettings *settings) {
char *dbname=PQdb(settings->db);
@ -788,7 +788,7 @@ do_connect(const char *new_dbname, PsqlSettings *settings) {
}
void
static void
do_edit(const char *filename_arg, char *query, int *retcode_p) {
int fd;
@ -853,7 +853,7 @@ do_edit(const char *filename_arg, char *query, int *retcode_p) {
void
static void
do_help(const char *topic) {
if (!topic) {
@ -907,7 +907,7 @@ do_help(const char *topic) {
void
static void
do_shell(const char *command) {
if (!command) {

View File

@ -12,6 +12,10 @@
#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>
@ -142,6 +146,38 @@ typedef struct GISTENTRY {
{(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,
@ -149,4 +185,15 @@ 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 */

View File

@ -11,10 +11,17 @@
*/
#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 */

View File

@ -15,11 +15,9 @@
#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 */

View File

@ -6,7 +6,7 @@
*
* 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.
@ -277,6 +277,7 @@ extern uint32 hashchar4(uint32 intkey);
extern uint32 hashchar8(char *key);
extern uint32 hashchar16(char *key);
extern uint32 hashtext(struct varlena *key);
extern uint32 hashname(NameData *n);
/* private routines */

View File

@ -6,14 +6,17 @@
*
* 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
@ -134,4 +137,9 @@ extern void PrintHeapAccessStatistics(HeapAccessStatistics stats);
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 */

View File

@ -6,14 +6,19 @@
*
* 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>
@ -99,4 +104,39 @@ typedef RTreeScanOpaqueData *RTreeScanOpaque;
/* 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 */

View File

@ -6,7 +6,7 @@
*
* 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
@ -140,14 +140,14 @@ typedef VariableRelationContentsData *VariableRelationContents;
/*
* 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);

View File

@ -6,7 +6,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -55,7 +55,7 @@ typedef TransactionStateData *TransactionState;
* extern definitions
* ----------------
*/
extern int TransactionFlushEnabled();
extern int TransactionFlushEnabled(void);
extern void SetTransactionFlushEnabled(bool state);
extern bool IsTransactionState(void);
@ -90,12 +90,15 @@ extern void AbortCurrentTransaction(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,

View File

@ -6,7 +6,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -36,9 +36,9 @@ extern void DeletePgTypeTuple(Relation rdesc);
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 */

View File

@ -6,7 +6,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -37,6 +37,7 @@ extern void CreateFunction(ProcedureStmt *stmt, CommandDest dest);
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

View File

@ -6,7 +6,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -142,7 +142,7 @@ extern TupleDesc ExecTypeFromTL(List *targetList);
/*
* 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);

View File

@ -6,17 +6,13 @@
*
* 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);

View File

@ -26,7 +26,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -50,7 +50,7 @@ typedef struct Dllist {
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*);

View File

@ -7,7 +7,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -33,7 +33,7 @@
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);

34
src/include/nodes/print.h Normal file
View File

@ -0,0 +1,34 @@
/*-------------------------------------------------------------------------
*
* 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 */

View File

@ -6,7 +6,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -22,6 +22,6 @@ extern void *nodeRead(bool read_car_only);
/*
* prototypes for functions in readfuncs.c
*/
extern Node *parsePlanString();
extern Node *parsePlanString(void);
#endif /* READFUNCS_H */

View File

@ -6,7 +6,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -15,10 +15,10 @@
#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 */

View File

@ -6,7 +6,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -66,7 +66,7 @@ extern int NumLevels;
#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 */

View File

@ -6,7 +6,7 @@
*
* 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
@ -230,8 +230,8 @@ extern BufferDesc *LocalBufferAlloc(Relation reln, BlockNumber blockNum,
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 */

View File

@ -6,7 +6,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -57,7 +57,7 @@ typedef struct SHM_QUEUE {
} 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);

View File

@ -6,7 +6,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -20,7 +20,7 @@ extern SPINLOCK SInvalLock;
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)(),

View File

@ -6,7 +6,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -85,5 +85,7 @@ extern int MMShmemSize(void);
/* 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 */

View File

@ -26,7 +26,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -64,14 +64,14 @@ typedef struct AttrInfo {
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 */

View File

@ -6,7 +6,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -20,7 +20,7 @@ extern QueryDesc *CreateQueryDesc(Query *parsetree, Plan *plantree,
CommandDest dest);
*/
extern EState *CreateExecutorState();
extern EState *CreateExecutorState(void);
extern void ProcessPortal(char *portalName, Query *parseTree,

View File

@ -6,7 +6,7 @@
*
* 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
@ -29,11 +29,11 @@ extern void pg_eval_dest(char *query_string, char **argv, Oid *typev,
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 */

View File

@ -6,7 +6,7 @@
*
* 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
@ -126,7 +126,7 @@ typedef ArrayType IdList;
*/
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);

View File

@ -6,7 +6,7 @@
*
* 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.
@ -20,6 +20,7 @@
#include <storage/itemptr.h>
#include <utils/geo-decls.h>
#include <utils/datetime.h>
#include <utils/nabstime.h>
#include <utils/rel.h>
@ -183,41 +184,30 @@ extern int atof1(char *str, double *val);
* 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();
@ -259,6 +249,7 @@ extern int32 intervalov(TimeInterval i1, TimeInterval i2);
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);
@ -338,6 +329,8 @@ extern long float84ge(float64 arg1, float32 arg2);
/* 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 */
@ -353,6 +346,8 @@ extern char *oidout(Oid o);
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);
@ -363,6 +358,8 @@ extern bool char8regexeq(char *s, 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);
@ -399,10 +396,33 @@ extern float64 hashsel(Oid operatorOid, Oid indrelid, AttrNumber attributeNumber
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);
@ -410,6 +430,8 @@ extern struct varlena *shove_bytes(unsigned char *stuff, int len);
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);
@ -422,6 +444,42 @@ extern int32 byteaGetBit(struct varlena *v, int32 n);
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 */

View File

@ -0,0 +1,30 @@
/*-------------------------------------------------------------------------
*
* 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 */

View File

@ -6,7 +6,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -35,7 +35,7 @@
extern void elog(int lev, const char *fmt, ...);
#ifndef PG_STANDALONE
int DebugFileOpen();
int DebugFileOpen(void);
#endif
#endif /* ELOG_H */

View File

@ -6,7 +6,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -79,7 +79,7 @@ typedef void ExcProc(Exception*, ExcDetail, ExcData, ExcMessage);
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);

View File

@ -6,7 +6,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -23,5 +23,6 @@ typedef struct {
extern FmgrCall *fmgr_isbuiltin(Oid id);
extern func_ptr fmgr_lookupByName(char* name);
extern void load_file(char *filename);
#endif /* FMGRTAB_H */

View File

@ -6,7 +6,7 @@
*
* 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/.
@ -18,6 +18,8 @@
#ifndef GEO_DECLS_H
#define GEO_DECLS_H
#include "access/attnum.h"
/*#ifndef FmgrIncluded -- seems like always included. (it's FMgrIncluded) AY */
/*--------------------------------------------------------------------
@ -234,13 +236,17 @@ extern long poly_contain(POLYGON *polya, POLYGON *polyb);
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 */

View File

@ -6,7 +6,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -36,9 +36,9 @@ extern void RelationCacheInvalidate(bool onlyFlushReferenceCountZero);
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 */

View File

@ -7,7 +7,7 @@
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -18,6 +18,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <netdb.h>
#include <errno.h>
@ -55,7 +56,7 @@ static void freePGconn(PGconn *conn);
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
@ -236,7 +237,7 @@ PQconnectdb(const char *conninfo)
* ----------------
*/
PQconninfoOption*
PQconndefaults()
PQconndefaults(void)
{
char errorMessage[ERROR_MSG_LENGTH];

View File

@ -6,7 +6,7 @@
*
* 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 $
*
*-------------------------------------------------------------------------
*/
@ -170,7 +170,7 @@ typedef struct _PQconninfoOption PQconninfoOption;
/* === 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 */