*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.44 1998/09/07 05:35:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.45 1998/10/08 18:29:10 momjian Exp $
*
* NOTES
* The old interface functions have been converted to macros
return byval;
}
+#ifdef NOT_USED
/* ----------------
* heap_getsysattr
* ----------------
}
return (Datum) NULL;
}
+#endif
/* ----------------
* nocachegetattr
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.35 1998/09/01 04:26:51 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.36 1998/10/08 18:29:12 momjian Exp $
*
*
* INTERFACE ROUTINES
#include <string.h>
#endif
+static void doinsert(Relation relation, HeapTuple tup);
+
static bool ImmediateInvalidation;
/* ----------------------------------------------------------------
}
}
-void
+static void
doinsert(Relation relation, HeapTuple tup)
{
RelationPutHeapTupleAtEnd(relation, tup);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.14 1998/09/01 03:21:07 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.15 1998/10/08 18:29:14 momjian Exp $
*
* NOTES
* many of the old access method routines have been turned into
scan->numberOfKeys * sizeof(ScanKeyData));
}
-#endif
-
-#ifdef NOT_USED
/* ----------------
* IndexScanEnd -- End and index scan.
*
pfree(scan);
}
-#endif
/* ----------------
* IndexScanMarkPosition -- Mark current position in a scan.
scan->flags = 0x0; /* XXX should have a symbolic name */
}
+#endif
+
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.24 1998/10/06 02:39:58 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.25 1998/10/08 18:29:15 momjian Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
TransactionFlushState = (state == true);
}
-#endif
/* --------------------------------
* IsTransactionState
*/
return false;
}
+#endif
/* --------------------------------
* IsAbortedTransactionBlockState
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.17 1998/09/01 03:21:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.18 1998/10/08 18:29:18 momjian Exp $
*
* OLD COMMENTS
* XXX WARNING
}
+#ifdef NOT_USED
/* ----------------------------------------------------------------
* TransactionIdIsLessThan
* ----------------------------------------------------------------
{
return (bool) (id1 < id2);
}
+#endif
/* ----------------------------------------------------------------
* xideq
# Makefile for catalog
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.13 1998/08/25 04:19:14 momjian Exp $
+# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.14 1998/10/08 18:29:19 momjian Exp $
#
#-------------------------------------------------------------------------
LOCALBKI_SRCS= $(addprefix ../../include/catalog/, \
pg_proc.h pg_type.h pg_attribute.h pg_class.h \
- pg_inherits.h pg_index.h pg_version.h pg_statistic.h \
+ pg_inherits.h pg_index.h pg_statistic.h \
pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
pg_language.h pg_parg.h \
pg_aggregate.h pg_ipl.h pg_inheritproc.h \
* Routines for handling of 'SET var TO',
* 'SHOW var' and 'RESET var' statements.
*
- * $Id: variable.c,v 1.13 1998/09/03 02:34:29 momjian Exp $
+ * $Id: variable.c,v 1.14 1998/10/08 18:29:20 momjian Exp $
*
*/
#include "mb/pg_wchar.h"
#endif
+static bool show_date(void);
+static bool reset_date(void);
+static bool parse_date(const char *);
+static bool show_timezone(void);
+static bool reset_timezone(void);
+static bool parse_timezone(const char *);
+static bool show_cost_heap(void);
+static bool reset_cost_heap(void);
+static bool parse_cost_heap(const char *);
+static bool show_cost_index(void);
+static bool reset_cost_index(void);
+static bool parse_cost_index(const char *);
+static bool show_r_plans(void);
+static bool reset_r_plans();
+static bool parse_r_plans(const char *);
+static bool reset_geqo(void);
+static bool show_geqo(void);
+static bool parse_geqo(const char *);
+static bool show_ksqo(void);
+static bool reset_ksqo(void);
+static bool parse_ksqo(const char *);
+
extern Cost _cpu_page_wight_;
extern Cost _cpu_index_page_wight_;
extern bool _use_geqo_;
}
/*-----------------------------------------------------------------------*/
-bool
+static bool
parse_geqo(const char *value)
{
const char *rest;
return TRUE;
}
-bool
+static bool
show_geqo()
{
return TRUE;
}
-bool
+static bool
reset_geqo(void)
{
return TRUE;
}
-bool
+static bool
parse_r_plans(const char *value)
{
if (value == NULL)
}
/*-----------------------------------------------------------------------*/
-bool
+static bool
show_r_plans()
{
return TRUE;
}
-bool
+static bool
reset_r_plans()
{
}
/*-----------------------------------------------------------------------*/
-bool
+static bool
parse_cost_heap(const char *value)
{
float32 res;
return TRUE;
}
-bool
+static bool
reset_cost_heap()
{
_cpu_page_wight_ = _CPU_PAGE_WEIGHT_;
}
/*-----------------------------------------------------------------------*/
-bool
+static bool
parse_cost_index(const char *value)
{
float32 res;
return TRUE;
}
-bool
+static bool
reset_cost_index()
{
_cpu_index_page_wight_ = _CPU_INDEX_PAGE_WEIGHT_;
}
/*-----------------------------------------------------------------------*/
-bool
+static bool
parse_date(const char *value)
{
char *tok;
return TRUE;
}
-bool
+static bool
show_date()
{
char buf[64];
* Try to save existing TZ environment variable for later use in RESET TIME ZONE.
* - thomas 1997-11-10
*/
-bool
+static bool
parse_timezone(const char *value)
{
char *tok;
return TRUE;
} /* parse_timezone() */
-bool
+static bool
show_timezone()
{
char *tz;
See optimizer/prep/prepkeyset.c for more on this.
daveh@insightdist.com 6/16/98
-----------------------------------------------------------------------*/
-bool
+static bool
parse_ksqo(const char *value)
{
if (value == NULL)
return TRUE;
}
-bool
+static bool
show_ksqo()
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.20 1998/09/01 03:22:20 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.21 1998/10/08 18:29:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
return slot->ttc_shouldFree;
}
-#endif
/* --------------------------------
* ExecSetSlotPolicy
return old_shouldFree;
}
+#endif
/* --------------------------------
* ExecSlotDescriptor
commonscanstate->css_ScanTupleSlot = (TupleTableSlot *) slot;
}
+#ifdef NOT_USED
/* ----------------
* ExecInitMarkedTupleSlot
* ----------------
INIT_SLOT_ALLOC;
mergestate->mj_MarkedTupleSlot = (TupleTableSlot *) slot;
}
+#endif
/* ----------------
* ExecInitOuterTupleSlot
* ExecEndTee
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.23 1998/09/01 04:28:40 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.24 1998/10/08 18:29:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
return result;
}
+#ifdef NOT_USED
/* ----------------------------------------------------------------
* ExecTeeReScan(node)
*
}
}
}
+#endif
/* ---------------------------------------------------------------------
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.27 1998/09/09 03:48:02 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.28 1998/10/08 18:29:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static bool OperandIsInner(Node *opnd, int inner_relid);
static List *replace_agg_clause(Node *expr, List *targetlist);
static Node *del_agg_clause(Node *clause);
+static void set_result_tlist_references(Result *resultNode);
/*****************************************************************************
*
* 2) this routine will probably *NOT* work with nested dot
* fields....
*/
-void
+static void
set_result_tlist_references(Result *resultNode)
{
Plan *subplan;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.22 1998/09/23 04:22:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.23 1998/10/08 18:29:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
return list;
}
+#ifdef NOT_USED
/*
* VersionGetParents--
*
heap_close(relation);
return list;
}
+#endif
+
/*****************************************************************************
*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.40 1998/10/03 05:40:42 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.41 1998/10/08 18:29:33 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
static char *xlateSqlType(char *);
static Node *makeA_Expr(int oper, char *opname, Node *lexpr, Node *rexpr);
static Node *makeRowExpr(char *opr, List *largs, List *rargs);
-void mapTargetColumns(List *source, List *target);
+static void mapTargetColumns(List *source, List *target);
static List *makeConstantList( A_Const *node);
static char *FlattenStringList(List *list);
static char *fmtId(char *rawid);
return expr;
}
-void
+static void
mapTargetColumns(List *src, List *dst)
{
ColumnDef *s;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.34 1998/10/02 16:23:04 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.35 1998/10/08 18:29:41 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
static char *xlateSqlType(char *);
static Node *makeA_Expr(int oper, char *opname, Node *lexpr, Node *rexpr);
static Node *makeRowExpr(char *opr, List *largs, List *rargs);
-void mapTargetColumns(List *source, List *target);
+static void mapTargetColumns(List *source, List *target);
static List *makeConstantList( A_Const *node);
static char *FlattenStringList(List *list);
static char *fmtId(char *rawid);
return expr;
}
-void
+static void
mapTargetColumns(List *src, List *dst)
{
ColumnDef *s;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.7 1998/10/01 22:45:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.8 1998/10/08 18:29:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
Oid DemoteType(Oid inType);
Oid PromoteTypeToNext(Oid inType);
+static Oid PreferredType(CATEGORY category, Oid type);
+
/* coerce_type()
* Convert a function argument to a different type.
/* PreferredType()
* Return the preferred type OID for the specified category.
*/
-Oid
+static Oid
PreferredType(CATEGORY category, Oid type)
{
Oid result;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.29 1998/09/25 13:36:04 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.30 1998/10/08 18:29:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
CandidateList *candidates);
static List *setup_tlist(char *attname, Oid relid);
static List *setup_base_tlist(Oid typeid);
+static Oid *func_select_candidate(int nargs, Oid *input_typeids,
+ CandidateList candidates);
#define ISCOMPLEX(type) (typeidTypeRelid(type) ? true : false)
* But for now, return NULL and make the user give a better hint.
* - thomas 1998-03-17
*/
-Oid *
+static Oid *
func_select_candidate(int nargs,
Oid *input_typeids,
CandidateList candidates)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.19 1998/09/25 13:36:07 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.20 1998/10/08 18:29:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "storage/bufmgr.h"
#include "utils/syscache.h"
-Oid * oper_select_candidate(int nargs, Oid *input_typeids, CandidateList candidates);
+static Oid * oper_select_candidate(int nargs, Oid *input_typeids,
+ CandidateList candidates);
static int binary_oper_get_candidates(char *opname,
Oid leftTypeId,
Oid rightTypeId,
* some sense. (see equivalentOpersAfterPromotion for details.)
* - ay 6/95
*/
-Oid *
+static Oid *
oper_select_candidate(int nargs,
Oid *input_typeids,
CandidateList candidates)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.29 1998/09/25 13:36:08 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.30 1998/10/08 18:29:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static List *ExpandAllTables(ParseState *pstate);
static char *FigureColname(Node *expr, Node *resval);
-Node *SizeTargetExpr(ParseState *pstate,
+static Node *SizeTargetExpr(ParseState *pstate,
Node *expr,
Oid attrtype,
int32 attrtypmod);
* Apparently going to a fixed-length string?
* Then explicitly size for storage...
*/
-Node *
+static Node *
SizeTargetExpr(ParseState *pstate,
Node *expr,
Oid attrtype,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.16 1998/09/01 04:30:39 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.17 1998/10/08 18:29:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
}
/* Given a type id, returns the out-conversion function of the type */
+#ifdef NOT_USED
Oid
typeidOutfunc(Oid type_id)
{
outfunc = type->typoutput;
return outfunc;
}
+#endif
Oid
typeidTypeRelid(Oid type_id)
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
- * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.28 1998/09/15 02:25:09 scrappy Exp $
+ * /master/usr.bin/lex/skel.c,v 1.3 1997/09/25 00:10:23 jch Exp
*/
#define FLEX_SCANNER
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.28 1998/09/15 02:25:09 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.29 1998/10/08 18:29:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* MAX_PARSE_BUFFER is defined in miscadmin.h */
#define YYLMAX MAX_PARSE_BUFFER
#define YY_NO_UNPUT
-extern int myinput(char* buf, int max);
+static int myinput(char* buf, int max);
#undef YY_INPUT
#define YY_INPUT(buf,result,max) {result = myinput(buf,max);}
#else
#ifdef FLEX_SCANNER
/* input routine for flex to read input from a string instead of a file */
-int
+static int
myinput(char* buf, int max)
{
int len, copylen;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.43 1998/09/01 03:24:23 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.44 1998/10/08 18:29:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* MAX_PARSE_BUFFER is defined in miscadmin.h */
#define YYLMAX MAX_PARSE_BUFFER
#define YY_NO_UNPUT
-extern int myinput(char* buf, int max);
+static int myinput(char* buf, int max);
#undef YY_INPUT
#define YY_INPUT(buf,result,max) {result = myinput(buf,max);}
#else
#ifdef FLEX_SCANNER
/* input routine for flex to read input from a string instead of a file */
-int
+static int
myinput(char* buf, int max)
{
int len, copylen;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.19 1998/10/02 16:27:49 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.20 1998/10/08 18:29:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
return (Node *) c;
}
+#ifdef NOT_USED
void
FixResdomTypes(List *tlist)
{
}
}
}
+#endif
static Node *
FindMatchingNew(List *tlist, int attno)
}
}
+#ifdef NOT_USED
void
HandleViewRule(Query *parsetree,
List *rtable,
nodeHandleViewRule((Node **) (&(parsetree->groupClause)), rtable, targetlist, rt_index,
modified, 0);
}
+#endif
+
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.43 1998/09/01 04:31:41 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.44 1998/10/08 18:29:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static int FlushBuffer(Buffer buffer, bool release);
static void BufferSync(void);
static int BufferReplace(BufferDesc *bufHdr, bool bufferLockHeld);
+static void PrintBufferDescs(void);
/* not static but used by vacuum only ... */
int BlowawayRelationBuffers(Relation rel, BlockNumber block);
return BufferDescriptors[buffer - 1].tag.blockNum;
}
+#ifdef NOT_USED
/*
* BufferGetRelation --
* Returns the relation desciptor associated with a buffer.
return relation;
}
+#endif
/*
* BufferReplace
* use only.
* -----------------------------------------------------------------
*/
-void
+static void
PrintBufferDescs()
{
int i;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.37 1998/09/09 18:32:05 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.38 1998/10/08 18:29:57 momjian Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
return false;
}
+#ifdef NOT_USED
/*
* Return an array with the pids of all processes owning a lock.
* This works only for user locks because normal locks have no
return array;
}
+#endif
#ifdef DEADLOCK_DEBUG
/*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.25 1998/09/01 04:32:01 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.26 1998/10/08 18:29:59 momjian Exp $
*
* NOTES:
* (1) The lock.c module assumes that the caller here is doing
return MultiAcquire(MultiTableId, &tag, lockmode, RELN_LEVEL);
}
+#ifdef NOT_USED
/*
* MultiLockTuple -- Lock the TID associated with a tuple
*
tag.tupleId = *tidPtr;
return MultiAcquire(MultiTableId, &tag, lockmode, TUPLE_LEVEL);
}
+#endif
/*
* same as above at page level
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.20 1998/09/01 04:32:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.21 1998/10/08 18:30:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* write-once storage managers.
*/
+#ifdef NOT_USED
static bool smgrwo[] = {
false, /* magnetic disk */
#ifdef STABLE_MEMORY_STORAGE
false, /* main memory */
#endif
};
+#endif
+
static int NSmgr = lengthof(smgrsw);
/*
#endif
+#ifdef NOT_USED
bool
smgriswo(int16 smgrno)
{
return smgrwo[smgrno];
}
+#endif
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.27 1998/09/01 04:32:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.28 1998/10/08 18:30:05 momjian Exp $
*
* NOTES
* This code is actually (almost) unused.
* PRIVATE ROUTINES *
*****************************************************************************/
+#ifdef NOT_USED
/*
* isreltime - returns 1, iff datestring is of type reltime
* 2, iff datestring is 'invalid time' identifier
return 0;
} /* isreltime() */
+#endif
#if FALSE
int
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.58 1998/09/23 17:51:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.59 1998/10/08 18:30:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static DateTime dt2local(DateTime dt, int timezone);
static void dt2time(DateTime dt, int *hour, int *min, double *sec);
static int j2day(int jd);
+static double time2t(const int hour, const int min, const double sec);
+static int timespan2tm(TimeSpan span, struct tm * tm, float8 *fsec);
+static int tm2timespan(struct tm * tm, double fsec, TimeSpan *span);
#define USE_DATE_CACHE 1
#define ROUND_ALL 0
/* timespan2tm()
* Convert a timespan data type to a tm structure.
*/
-int
+static int
timespan2tm(TimeSpan span, struct tm * tm, float8 *fsec)
{
double time;
return 0;
} /* timespan2tm() */
-int
+static int
tm2timespan(struct tm * tm, double fsec, TimeSpan *span)
{
span->month = ((tm->tm_year * 12) + tm->tm_mon);
return dt;
} /* dt2local() */
-double
+static double
time2t(const int hour, const int min, const double sec)
{
return (((hour * 60) + min) * 60) + sec;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.45 1998/09/01 03:26:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.46 1998/10/08 18:30:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
return time1 < time2;
}
+#ifdef NOT_USED
bool
AbsoluteTimeIsAfter(AbsoluteTime time1, AbsoluteTime time2)
{
return time1 > time2;
}
-
+#endif
/* abstime_finite()
*/
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.15 1998/09/01 04:32:40 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.16 1998/10/08 18:30:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#endif
+#ifdef NOT_USED
int
namecmp(Name n1, Name n2)
{
return strncmp(n1->data, n2->data, NAMEDATALEN);
}
+#endif
int
namestrcpy(Name name, char *str)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.43 1998/09/02 23:37:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.44 1998/10/08 18:30:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "mb/pg_wchar.h"
+static int text_cmp(text *arg1, text *arg2);
+
+
/*****************************************************************************
* USER I/O ROUTINES *
*****************************************************************************/
return result;
} /* varstr_cmp() */
+
/* text_cmp()
* Comparison function for text strings.
* Includes locale support, but must copy strings to temporary memory
* but it appears that most routines (incl. this one) assume not! - tgl 97/04/07
* Returns -1, 0 or 1
*/
-int
+static int
text_cmp(text *arg1, text *arg2)
{
char *a1p,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.20 1998/09/01 03:26:42 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.21 1998/10/08 18:30:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static func_ptr user_fn_save = (func_ptr) NULL;
static func_ptr handle_load(char *filename, char *funcname);
-func_ptr trigger_dynamic(char *filename, char *funcname);
-
func_ptr
fmgr_dynamic(Oid procedureId, int *pronargs)
{
handle_load(filename, (char *) NULL);
}
+/* Is this used? bjm 1998/10/08 */
func_ptr
trigger_dynamic(char *filename, char *funcname)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.23 1998/10/05 02:48:49 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.24 1998/10/08 18:30:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
proc_exit(FatalExitStatus);
}
-#endif
/* ----------------
* StatusBackendExit
/* someday, do some real cleanup and then call the LISP exit */
proc_exit(status);
}
+#endif
+
/* ----------------------------------------------------------------
* processing mode support stuff (used to be in pmod.c)
*/
static ProcessingMode Mode = NoProcessing;
+#ifdef NOT_USED
/*
* IsNoProcessingMode --
* True iff processing mode is NoProcessing.
{
return (bool) (Mode == NoProcessing);
}
+#endif
/*
* IsBootstrapProcessingMode --
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: genam.h,v 1.16 1998/09/01 04:34:06 momjian Exp $
+ * $Id: genam.h,v 1.17 1998/10/08 18:30:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* in genam.c */
extern IndexScanDesc RelationGetIndexScan(Relation relation, bool scanFromEnd,
uint16 numberOfKeys, ScanKey key);
-extern void IndexScanMarkPosition(IndexScanDesc scan);
-extern void IndexScanRestorePosition(IndexScanDesc scan);
#endif /* GENAM_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: heapam.h,v 1.37 1998/09/01 04:34:12 momjian Exp $
+ * $Id: heapam.h,v 1.38 1998/10/08 18:30:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* heap_create, heap_creatr, and heap_destroy are declared in catalog/heap.h */
/* heapam.c */
-extern void doinsert(Relation relation, HeapTuple tup);
extern Relation heap_open(Oid relationId);
extern Relation heap_openr(char *relationName);
extern int heap_attisnull(HeapTuple tup, int attnum);
extern int heap_sysattrlen(AttrNumber attno);
extern bool heap_sysattrbyval(AttrNumber attno);
-extern Datum heap_getsysattr(HeapTuple tup, Buffer b, int attnum);
extern Datum nocachegetattr(HeapTuple tup, int attnum,
TupleDesc att, bool *isnull);
extern HeapTuple heap_copytuple(HeapTuple tuple);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: xact.h,v 1.16 1998/10/06 02:40:06 tgl Exp $
+ * $Id: xact.h,v 1.17 1998/10/08 18:30:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern int TransactionFlushEnabled(void);
extern void SetTransactionFlushEnabled(bool state);
-extern bool IsTransactionState(void);
extern bool IsAbortedTransactionBlockState(void);
extern void OverrideTransactionSystem(bool flag);
extern TransactionId GetCurrentTransactionId(void);
extern TransactionId xidin(char *representation);
extern char *xidout(TransactionId transactionId);
extern bool xideq(TransactionId xid1, TransactionId xid2);
-extern bool TransactionIdIsLessThan(TransactionId id1, TransactionId id2);
extern void TransactionIdAdd(TransactionId *xid, int value);
#endif /* XACT_H */
* Headers for handling of 'SET var TO', 'SHOW var' and 'RESET var'
* statements
*
- * $Id: variable.h,v 1.7 1998/09/03 02:34:34 momjian Exp $
+ * $Id: variable.h,v 1.8 1998/10/08 18:30:27 momjian Exp $
*
*/
#ifndef VARIABLE_H
bool GetPGVariable(const char *);
bool ResetPGVariable(const char *);
-extern bool set_date(void);
-extern bool show_date(void);
-extern bool reset_date(void);
-extern bool parse_date(const char *);
-extern bool set_timezone(void);
-extern bool show_timezone(void);
-extern bool reset_timezone(void);
-extern bool parse_timezone(const char *);
-extern bool set_cost_heap(void);
-extern bool show_cost_heap(void);
-extern bool reset_cost_heap(void);
-extern bool parse_cost_heap(const char *);
-extern bool set_cost_index(void);
-extern bool show_cost_index(void);
-extern bool reset_cost_index(void);
-extern bool parse_cost_index(const char *);
-extern bool set_r_plans(void);
-extern bool show_r_plans(void);
-extern bool reset_r_plans(void);
-extern bool parse_r_plans(const char *);
-extern bool set_geqo(void);
-extern bool show_geqo(void);
-extern bool reset_geqo(void);
-extern bool parse_geqo(const char *);
-extern bool show_ksqo(void);
-extern bool reset_ksqo(void);
-extern bool parse_ksqo(const char *);
-
#endif /* VARIABLE_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: executor.h,v 1.25 1998/09/01 04:35:49 momjian Exp $
+ * $Id: executor.h,v 1.26 1998/10/08 18:30:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
Buffer buffer,
bool shouldFree);
extern TupleTableSlot *ExecClearTuple(TupleTableSlot *slot);
-extern bool ExecSetSlotPolicy(TupleTableSlot *slot, bool shouldFree);
extern TupleDesc ExecSetSlotDescriptor(TupleTableSlot *slot,
TupleDesc tupdesc);
extern void ExecSetSlotDescriptorIsNew(TupleTableSlot *slot, bool isNew);
extern void ExecInitResultTupleSlot(EState *estate, CommonState *commonstate);
extern void ExecInitScanTupleSlot(EState *estate,
CommonScanState *commonscanstate);
-extern void ExecInitMarkedTupleSlot(EState *estate, MergeJoinState *mergestate);
extern void ExecInitOuterTupleSlot(EState *estate, HashJoinState *hashstate);
extern TupleDesc ExecGetTupType(Plan *node);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeTee.h,v 1.6 1998/09/01 04:36:09 momjian Exp $
+ * $Id: nodeTee.h,v 1.7 1998/10/08 18:30:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern TupleTableSlot *ExecTee(Tee *node, Plan *parent);
extern bool ExecInitTee(Tee *node, EState *estate, Plan *parent);
-extern void ExecTeeReScan(Tee *node, ExprContext *exprCtxt, Plan *parent);
extern void ExecEndTee(Tee *node, Plan *parent);
extern int ExecCountSlotsTee(Tee *node);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: miscadmin.h,v 1.33 1998/09/01 04:33:59 momjian Exp $
+ * $Id: miscadmin.h,v 1.34 1998/10/08 18:30:18 momjian Exp $
*
* NOTES
* some of the information in this file will be moved to
/* in miscinit.c */
extern void ExitPostgres(ExitStatus status);
-extern void StatusBackendExit(int status);
-extern void StatusPostmasterExit(int status);
-extern bool IsNoProcessingMode(void);
extern bool IsBootstrapProcessingMode(void);
extern bool IsInitProcessingMode(void);
extern bool IsNormalProcessingMode(void);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: plancat.h,v 1.9 1998/09/01 04:37:16 momjian Exp $
+ * $Id: plancat.h,v 1.10 1998/10/08 18:30:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
Oid relationObjectId2, AttrNumber attributeNumber2);
extern List *find_inheritance_children(Oid inhparent);
-extern List *VersionGetParents(Oid verrelid);
#endif /* PLANCAT_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: planmain.h,v 1.16 1998/09/03 02:34:35 momjian Exp $
+ * $Id: planmain.h,v 1.17 1998/10/08 18:30:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
List *inner_tlist);
extern List *index_outerjoin_references(List *inner_indxqual,
List *outer_tlist, Index inner_relid);
-extern void set_result_tlist_references(Result *resultNode);
extern List *set_agg_tlist_references(Agg *aggNode);
extern void set_agg_agglist_references(Agg *aggNode);
extern void del_agg_tlist_references(List *tlist);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_coerce.h,v 1.5 1998/09/01 04:37:32 momjian Exp $
+ * $Id: parse_coerce.h,v 1.6 1998/10/08 18:30:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern bool IsPreferredType(CATEGORY category, Oid type);
-extern Oid PreferredType(CATEGORY category, Oid type);
extern CATEGORY TypeCategory(Oid type);
extern bool can_coerce_type(int nargs, Oid *input_typeids, Oid *func_typeids);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_func.h,v 1.11 1998/09/01 04:37:34 momjian Exp $
+ * $Id: parse_func.h,v 1.12 1998/10/08 18:30:38 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern Node *ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
int *curr_resno, int precedence);
-extern Oid *
- func_select_candidate(int nargs, Oid *input_typeids, CandidateList candidates);
-
extern void
func_error(char *caller, char *funcname, int nargs, Oid *argtypes, char *msg);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_type.h,v 1.8 1998/09/01 04:37:40 momjian Exp $
+ * $Id: parse_type.h,v 1.9 1998/10/08 18:30:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern char *typeTypeName(Type t);
extern char typeTypeFlag(Type t);
extern char *stringTypeString(Type tp, char *string, int32 atttypmod);
-extern Oid typeidOutfunc(Oid type_id);
extern Oid typeidTypeRelid(Oid type_id);
extern Oid typeTypeRelid(Type typ);
extern Oid typeidTypElem(Oid type_id);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: rewriteManip.h,v 1.9 1998/09/01 04:38:03 momjian Exp $
+ * $Id: rewriteManip.h,v 1.10 1998/10/08 18:30:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
void AddHavingQual(Query *parsetree, Node *havingQual);
void AddNotQual(Query *parsetree, Node *qual);
-void FixResdomTypes(List *user_tlist);
void FixNew(RewriteInfo *info, Query *parsetree);
void HandleRIRAttributeRule(Query *parsetree, List *rtable, List *targetlist,
int rt_index, int attr_num, int *modified,
int *badpostquel);
-void HandleViewRule(Query *parsetree, List *rtable, List *targetlist,
- int rt_index, int *modified);
#endif /* REWRITEMANIP_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: bufmgr.h,v 1.22 1998/09/01 04:38:12 momjian Exp $
+ * $Id: bufmgr.h,v 1.23 1998/10/08 18:30:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern int BufferPoolCheckLeak(void);
extern void FlushBufferPool(int StableMainMemoryFlag);
extern BlockNumber BufferGetBlockNumber(Buffer buffer);
-extern Relation BufferGetRelation(Buffer buffer);
extern BlockNumber RelationGetNumberOfBlocks(Relation relation);
extern void ReleaseRelationBuffers(Relation rel);
extern void DropBuffers(Oid dbid);
-extern void PrintBufferDescs(void);
extern void PrintPinnedBufs(void);
extern int BufferShmemSize(void);
extern int ReleaseBuffer(Buffer buffer);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: lock.h,v 1.18 1998/09/01 04:38:24 momjian Exp $
+ * $Id: lock.h,v 1.19 1998/10/08 18:30:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern bool LockingDisabled(void);
extern bool DeadLockCheck(SHM_QUEUE *lockQueue, LOCK *findlock,
bool skip_check);
-ArrayType *LockOwners(LOCKMETHOD lockmethod, LOCKTAG *locktag);
#ifdef DEADLOCK_DEBUG
extern void DumpLocks(void);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: multilev.h,v 1.13 1998/09/01 04:38:25 momjian Exp $
+ * $Id: multilev.h,v 1.14 1998/10/08 18:30:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*/
extern LOCKMETHOD InitMultiLevelLocks(void);
extern bool MultiLockReln(LockInfo lockinfo, LOCKMODE lockmode);
-extern bool MultiLockTuple(LockInfo lockinfo, ItemPointer tidPtr, LOCKMODE lockmode);
extern bool MultiLockPage(LockInfo lockinfo, ItemPointer tidPtr, LOCKMODE lockmode);
extern bool MultiReleaseReln(LockInfo lockinfo, LOCKMODE lockmode);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: smgr.h,v 1.12 1998/09/01 04:38:37 momjian Exp $
+ * $Id: smgr.h,v 1.13 1998/10/08 18:30:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern int smgrnblocks(int16 which, Relation reln);
extern int smgrtruncate(int16 which, Relation reln, int nblocks);
extern int smgrcommit(void);
-extern bool smgriswo(int16 smgrno);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: builtins.h,v 1.59 1998/10/08 02:08:47 momjian Exp $
+ * $Id: builtins.h,v 1.60 1998/10/08 18:30:49 momjian Exp $
*
* NOTES
* This should normally only be included by fmgr.h.
extern bool namele(NameData *arg1, NameData *arg2);
extern bool namegt(NameData *arg1, NameData *arg2);
extern bool namege(NameData *arg1, NameData *arg2);
-extern int namecmp(Name n1, Name n2);
extern int namecpy(Name n1, Name n2);
extern int namestrcpy(Name name, char *str);
extern int namestrcmp(Name name, char *str);
extern bool intervalov(TimeInterval i1, TimeInterval i2);
extern AbsoluteTime intervalstart(TimeInterval i);
extern AbsoluteTime intervalend(TimeInterval i);
-extern int isreltime(char *timestring);
extern text *timeofday(void);
/* filename.c */
extern bool texteq(text *arg1, text *arg2);
extern bool textne(text *arg1, text *arg2);
extern int varstr_cmp(char *arg1, int len1, char *arg2, int len2);
-extern int text_cmp(text *arg1, text *arg2);
extern bool text_lt(text *arg1, text *arg2);
extern bool text_le(text *arg1, text *arg2);
extern bool text_gt(text *arg1, text *arg2);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: dt.h,v 1.32 1998/09/01 04:38:59 momjian Exp $
+ * $Id: dt.h,v 1.33 1998/10/08 18:30:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern DateTime SetDateTime(DateTime datetime);
extern int tm2datetime(struct tm * tm, double fsec, int *tzp, DateTime *dt);
extern int datetime2tm(DateTime dt, int *tzp, struct tm * tm, double *fsec, char **tzn);
-extern int timespan2tm(TimeSpan span, struct tm * tm, float8 *fsec);
-extern int tm2timespan(struct tm * tm, double fsec, TimeSpan *span);
extern void j2date(int jd, int *year, int *month, int *day);
extern int date2j(int year, int month, int day);
-extern double time2t(const int hour, const int min, const double sec);
-
extern int ParseDateTime(char *timestr, char *lowstr,
char **field, int *ftype, int maxfields, int *numfields);
extern int DecodeDateTime(char **field, int *ftype,
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nabstime.h,v 1.16 1998/09/01 04:39:23 momjian Exp $
+ * $Id: nabstime.h,v 1.17 1998/10/08 18:30:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern DateTime *abstime_datetime(AbsoluteTime abstime);
extern bool AbsoluteTimeIsBefore(AbsoluteTime time1, AbsoluteTime time2);
-extern bool AbsoluteTimeIsAfter(AbsoluteTime time1, AbsoluteTime time2);
extern void abstime2tm(AbsoluteTime time, int *tzp, struct tm * tm, char *tzn);