*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.44 2000/05/30 04:24:32 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.45 2000/06/08 22:36:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#endif
+#ifdef NOT_USED
/* ----------------
* StrategyTermEvaluate
* ----------------
return result;
}
-
+#endif
/* ----------------
* RelationGetStrategy
return strategy;
}
+#ifdef NOT_USED
/* ----------------
* RelationInvokeStrategy
* ----------------
}
+#endif
/* ----------------
* OperatorRelationFillScanKeyEntry
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.58 2000/05/30 04:24:33 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.59 2000/06/08 22:36:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static bool _bt_goesonpg(Relation rel, Buffer buf, Size keysz, ScanKey scankey, BTItem afteritem);
static void _bt_updateitem(Relation rel, Size keysz, Buffer buf, BTItem oldItem, BTItem newItem);
static bool _bt_isequal(TupleDesc itupdesc, Page page, OffsetNumber offnum, int keysz, ScanKey scankey);
+static int32 _bt_tuplecompare(Relation rel, Size keysz, ScanKey scankey,
+ IndexTuple tuple1, IndexTuple tuple2);
/*
* _bt_doinsert() -- Handle insertion of a single btitem in the tree.
* return -1, 0, or +1
*
*/
-int32
+static int32
_bt_tuplecompare(Relation rel,
Size keysz,
ScanKey scankey,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.65 2000/05/30 00:49:41 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.66 2000/06/08 22:36:54 momjian Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
}
+#ifdef NOT_USED
/* ---------------
* Tell me if we are currently in progress
* ---------------
{
return CurrentTransactionState->state == TRANS_INPROGRESS;
}
+#endif
/* --------------------------------
* CommitTransaction
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.113 2000/05/30 04:24:35 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.114 2000/06/08 22:36:59 momjian Exp $
*
*
* INTERFACE ROUTINES
IndexStrategy indexStrategy, uint16 parameterCount,
Datum *parameter, FuncIndexInfoPtr funcInfo, PredInfo *predInfo);
static Oid IndexGetRelation(Oid indexId);
+static bool activate_index(Oid indexId, bool activate);
static bool reindexing = false;
extern bool
* status per index
* ---------------------------------
*/
-bool
+static bool
activate_index(Oid indexId, bool activate)
{
if (!activate) /* Currently does nothing */
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.64 2000/06/07 04:09:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.65 2000/06/08 22:37:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
{
Relation lRel;
TupleDesc tdesc;
- HeapScanDesc scan;
HeapTuple tuple,
newtup;
Datum values[Natts_pg_listener];
char nulls[Natts_pg_listener];
- Datum d;
int i;
- bool isnull;
TupleDesc tupDesc;
if (Trace_notify)
static void CommentProc(char *function, List *arguments, char *comment);
static void CommentOperator(char *opname, List *arguments, char *comment);
static void CommentTrigger(char *trigger, char *relation, char *comments);
+static void CreateComments(Oid oid, char *comment);
/*------------------------------------------------------------------
* CommentObject --
*------------------------------------------------------------------
*/
-void
+static void
CreateComments(Oid oid, char *comment)
{
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.68 2000/05/30 00:49:43 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.69 2000/06/08 22:37:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static HeapTuple ExecCallTriggerFunc(Trigger *trigger,
TriggerData *trigdata);
+static void DeferredTriggerSaveEvent(Relation rel, int event,
+ HeapTuple oldtup, HeapTuple newtup);
+
void
CreateTrigger(CreateTrigStmt *stmt)
* Called by ExecAR...Triggers() to add the event to the queue.
* ----------
*/
-void
+static void
DeferredTriggerSaveEvent(Relation rel, int event,
HeapTuple oldtup, HeapTuple newtup)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.7 2000/05/30 00:49:45 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.8 2000/06/08 22:37:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* ExecTidReScan rescans the tid relation.
* ExecEndTidScan releases all storage.
* ExecTidMarkPos marks scan position.
- * ExecTidRestrPos restores scan position.
*
*/
#include "postgres.h"
tidstate->tss_MarkTidPtr = tidstate->tss_TidPtr;
}
+#ifdef NOT_USED
/* ----------------------------------------------------------------
* ExecTidRestrPos
*
tidstate = node->tidstate;
tidstate->tss_TidPtr = tidstate->tss_MarkTidPtr;
}
+#endif
/* ----------------------------------------------------------------
* ExecInitTidScan
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.17 2000/04/12 17:15:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.18 2000/06/08 22:37:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#endif
+#ifdef NOT_USED
Dlelem *
DLGetPred(Dlelem *e) /* get predecessor */
{
return e ? e->dle_prev : 0;
}
+#endif
Dlelem *
DLGetSucc(Dlelem *e) /* get successor */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.11 2000/01/26 05:56:31 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.12 2000/06/08 22:37:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* constant (CONST, PARAM) nodes
*****************************************************************************/
+#ifdef NOT_USED
/*
* non_null -
* Returns t if the node is a non-null constant, e.g., if the node has a
else
return false;
}
+#endif
+
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.37 2000/05/31 15:38:53 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.38 2000/06/08 22:37:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static void addRangeClause(RangeQueryClause **rqlist, Node *clause,
int flag, bool isLTsel, Selectivity s2);
+static Selectivity clause_selectivity(Query *root,
+ Node *clause,
+ int varRelid);
/****************************************************************************
* When varRelid is 0, all variables are treated as variables. This
* is appropriate for ordinary join clauses and restriction clauses.
*/
-Selectivity
+static Selectivity
clause_selectivity(Query *root,
Node *clause,
int varRelid)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.90 2000/05/23 16:56:36 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.91 2000/06/08 22:37:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
int keycount);
static void copy_path_costsize(Plan *dest, Path *src);
static void copy_plan_costsize(Plan *dest, Plan *src);
+static SeqScan *make_seqscan(List *qptlist, List *qpqual, Index scanrelid);
/*
* create_plan
}
-SeqScan *
+static SeqScan *
make_seqscan(List *qptlist,
List *qpqual,
Index scanrelid)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.25 2000/04/14 00:19:17 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.26 2000/06/08 22:37:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
return (List *) newqual;
}
+#ifdef NOT_USED
/*
* dnfify
* Convert a qualification to disjunctive normal form by applying
* We do not offer a 'removeOrFlag' in this case; the usages are
* different.
*/
-Expr *
+static Expr *
dnfify(Expr *qual)
{
Expr *newqual;
return newqual;
}
+#endif
/*--------------------
* The parser regards AND and OR as purely binary operators, so a qual like
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.26 2000/02/06 03:27:33 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.27 2000/06/08 22:37:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "optimizer/joininfo.h"
+static JoinInfo *joininfo_member(List *join_relids, List *joininfo_list);
/*
* joininfo_member
* exists.
*
*/
-JoinInfo *
+static JoinInfo *
joininfo_member(List *join_relids, List *joininfo_list)
{
List *i;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.45 2000/05/30 00:49:49 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.46 2000/06/08 22:37:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "optimizer/tlist.h"
#include "optimizer/var.h"
+static TargetEntry *tlistentry_member(Node *node, List *targetlist);
+
/*****************************************************************************
* ---------- RELATION node target list routines ----------
*****************************************************************************/
* Finds the (first) member of the given tlist whose expression is
* equal() to the given expression. Result is NULL if no such member.
*/
-TargetEntry *
+static TargetEntry *
tlistentry_member(Node *node, List *targetlist)
{
List *temp;
return NULL;
}
+#ifdef NOT_USED
/*
* matching_tlist_expr
* Same as tlistentry_member(), except returns the tlist expression
return (Node *) NULL;
}
+#endif
/*
* tlist_member
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.62 2000/05/30 00:49:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.63 2000/06/08 22:37:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static TargetEntry *findTargetlistEntry(ParseState *pstate, Node *node,
List *tlist, int clause);
static void parseFromClause(ParseState *pstate, List *frmList);
-RangeTblEntry *transformTableEntry(ParseState *pstate, RangeVar *r);
+static RangeTblEntry *transformTableEntry(ParseState *pstate, RangeVar *r);
static List *addTargetToSortList(TargetEntry *tle, List *sortlist,
List *targetlist, char *opname);
static bool exprIsInSortList(Node *expr, List *sortList, List *targetList);
return result;
}
-
+#ifdef NOT_USED
/* ExpandAttrs()
* Take an existing attribute node and return a list of attribute nodes
* with one attribute name per node.
*/
-List *
- ExpandAttrs(Attr *attr);
List *
ExpandAttrs(Attr *attr)
{
return rlist;
}
+#endif
/* transformUsingClause()
* Take an ON or USING clause from a join expression and expand if necessary.
#endif
-RangeTblEntry *
+static RangeTblEntry *
transformTableEntry(ParseState *pstate, RangeVar *r)
{
RelExpr *baserel = r->relExpr;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.41 2000/06/03 04:41:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.42 2000/06/08 22:37:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
"cid",
};
+#ifdef NOT_USED
/* refnameRangeTableEntries()
* Given refname, return a list of range table entries
* This is possible with JOIN syntax, where tables in a join
* to support outer joins in place yet.
* - thomas 2000-03-04
*/
-List *
- refnameRangeTableEntries(ParseState *pstate, char *refname);
-List *
+static List *
refnameRangeTableEntries(ParseState *pstate, char *refname)
{
List *rteList = NULL;
}
return rteList;
}
+#endif
/* given refname, return a pointer to the range table entry */
RangeTblEntry *
}
+#ifdef NOT_USED
/*
* Given range variable, return whether attribute of this name
* is a set.
}
return get_attisset(RelationGetRelid(rd), name);
}
+#endif
+#ifdef NOT_USED
/*
* This should only be used if the relation is already
* heap_open()'ed. Use the cache version
{
return rd->rd_att->attrs[attid - 1]->attnelems;
}
+#endif
/* given attribute id, return type of that attribute */
/*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.31 2000/06/06 16:50:37 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.32 2000/06/08 22:37:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
return typtup->typrelid;
}
+#ifdef NOT_USED
Oid
typeTypElem(Type typ)
{
return typtup->typelem;
}
+#endif
+#ifdef NOT_USED
/* Given the attribute type of an array return the attribute type of
an element of the array */
-
Oid
GetArrayElementType(Oid typearray)
{
return type_struct_array->typelem;
}
+#endif
+#ifdef NOT_USED
/* Given a type structure, return the in-conversion function of the type */
Oid
typeInfunc(Type typ)
return typtup->typinput;
}
+#endif
+#ifdef NOT_USED
/* Given a type structure, return the out-conversion function of the type */
Oid
typeOutfunc(Type typ)
return typtup->typoutput;
}
+#endif
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.81 2000/05/19 03:22:28 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.82 2000/06/08 22:37:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static void StartBufferIO(BufferDesc *buf, bool forInput);
static void TerminateBufferIO(BufferDesc *buf);
static void ContinueBufferIO(BufferDesc *buf, bool forInput);
-extern void InitBufferIO(void);
extern void AbortBufferIO(void);
/*
IsForInput = forInput;
}
+#ifdef NOT_USED
void
InitBufferIO(void)
{
InProgressBuf = (BufferDesc *) 0;
}
+#endif
/*
* This function is called from ProcReleaseSpins().
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/file/buffile.c,v 1.5 2000/04/12 17:15:35 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/file/buffile.c,v 1.6 2000/06/08 22:37:22 momjian Exp $
*
* NOTES:
*
return file;
}
+#ifdef NOT_USED
/*
* Create a BufFile and attach it to an already-opened virtual File.
*
{
return makeBufFile(file);
}
+#endif
/*
* Close a BufFile
return 0;
}
+#ifdef NOT_USED
void
BufFileTell(BufFile *file, int *fileno, long *offset)
{
*fileno = file->curFile;
*offset = file->curOffset + file->pos;
}
+#endif
/*
* BufFileSeekBlock --- block-oriented seek
SEEK_SET);
}
+#ifdef NOT_USED
/*
* BufFileTellBlock --- block-oriented tell
*
blknum += file->curFile * RELSEG_SIZE;
return blknum;
}
+#endif
+
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.40 2000/05/31 00:28:30 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.41 2000/06/08 22:37:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
elog(ERROR, "XactLockTableInsert: LockAcquire failed");
}
+#ifdef NOT_USED
void
XactLockTableDelete(TransactionId xid)
{
LockRelease(LockTableId, &tag, ExclusiveLock);
}
+#endif
void
XactLockTableWait(TransactionId xid)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.158 2000/06/04 01:44:33 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.159 2000/06/08 22:37:26 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
static int ReadCommand(StringInfo inBuf);
static void pg_exec_query(char *query_string);
static void SigHupHandler(SIGNAL_ARGS);
+static void FloatExceptionHandler(SIGNAL_ARGS);
+static void quickdie(SIGNAL_ARGS);
/*
* Flag to mark SIGHUP. Whenever the main loop comes around it
pg_exec_query_dest(query_string, whereToSendOutput, FALSE);
}
+#ifdef NOT_USED
void
pg_exec_query_acl_override(char *query_string)
{
pg_exec_query_dest(query_string, whereToSendOutput, TRUE);
}
+#endif
void
pg_exec_query_dest(char *query_string, /* string to execute */
siglongjmp(Warn_restart, 1);
}
-void
+static void
quickdie(SIGNAL_ARGS)
{
PG_SETMASK(&BlockSig);
}
/* signal handler for floating point exception */
-void
+static void
FloatExceptionHandler(SIGNAL_ARGS)
{
elog(ERROR, "floating point exception!"
static void
SigHupHandler(SIGNAL_ARGS)
{
- got_SIGHUP = true;
+ got_SIGHUP = true;
}
if (Show_query_stats &&
(Show_parser_stats || Show_planner_stats || Show_executor_stats))
{
- elog(NOTICE, "Query statistics are disabled because parser, planner, or executor statistics are on.");
- Show_query_stats = false;
+ elog(NOTICE, "Query statistics are disabled because parser, planner, or executor statistics are on.");
+ Show_query_stats = false;
}
if (!DataDir)
if (!IsUnderPostmaster)
{
puts("\nPOSTGRES backend interactive interface ");
- puts("$Revision: 1.158 $ $Date: 2000/06/04 01:44:33 $\n");
+ puts("$Revision: 1.159 $ $Date: 2000/06/08 22:37:26 $\n");
}
/*
DeferredTriggerEndQuery();
if (Show_query_stats)
- {
- fprintf(StatFp, "QUERY STATISTICS\n");
+ {
+ fprintf(StatFp, "QUERY STATISTICS\n");
ShowUsage();
- }
+ }
}
break;
/* DisplayTupleCount(StatFp); */
}
-#ifdef USE_ASSERT_CHECKING
-int
+#ifdef NOT_USED
+static int
assertEnable(int val)
{
assert_enabled = val;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.48 2000/05/29 19:16:57 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.49 2000/06/08 22:37:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "miscadmin.h"
#include "utils/datetime.h"
+static int DecodeNumber(int flen, char *field,
+ int fmask, int *tmask,
+ struct tm * tm, double *fsec, int *is2digits);
+static int DecodeNumberField(int len, char *str,
+ int fmask, int *tmask,
+ struct tm * tm, double *fsec, int *is2digits);
+static int DecodeTime(char *str, int fmask, int *tmask,
+ struct tm * tm, double *fsec);
+static int DecodeTimezone(char *str, int *tzp);
+static datetkn *datebsearch(char *key, datetkn *base, unsigned int nel);
+static int DecodeDate(char *str, int fmask, int *tmask, struct tm * tm);
#define USE_DATE_CACHE 1
#define ROUND_ALL 0
return 0;
} /* DecodeTimeOnly() */
-
/* DecodeDate()
* Decode date string which includes delimiters.
* Insist on a complete set of fields.
*/
-int
+static int
DecodeDate(char *str, int fmask, int *tmask, struct tm * tm)
{
double fsec;
* Only check the lower limit on hours, since this same code
* can be used to represent time spans.
*/
-int
+static int
DecodeTime(char *str, int fmask, int *tmask, struct tm * tm, double *fsec)
{
char *cp;
/* DecodeNumber()
* Interpret numeric field as a date value in context.
*/
-int
+static int
DecodeNumber(int flen, char *str, int fmask,
int *tmask, struct tm * tm, double *fsec, int *is2digits)
{
/* DecodeNumberField()
* Interpret numeric string as a concatenated date field.
*/
-int
+static int
DecodeNumberField(int len, char *str, int fmask,
int *tmask, struct tm * tm, double *fsec, int *is2digits)
{
return -1;
return 0;
-} /* DecodeNumberField() */
+} /* DecodeNumberField() */
/* DecodeTimezone()
* Interpret string as a numeric timezone.
*/
-int
+static int
DecodeTimezone(char *str, int *tzp)
{
int tz;
* Binary search -- from Knuth (6.2.1) Algorithm B. Special case like this
* is WAY faster than the generic bsearch().
*/
-datetkn *
+static datetkn *
datebsearch(char *key, datetkn *base, unsigned int nel)
{
datetkn *last = base + nel - 1,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.58 2000/06/05 07:28:51 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.59 2000/06/08 22:37:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "fmgr.h"
#include "utils/builtins.h"
+static void CheckFloat8Val(double val);
+
#ifndef NAN
#define NAN (0.0/0.0)
#endif
raise an elog warning if it is
*/
-void
+static void
CheckFloat8Val(double val)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.18 2000/05/30 00:49:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.19 2000/06/08 22:37:28 momjian Exp $
*
* NOTES
* input routine largely stolen from boxin().
arg1->ip_posid == arg2->ip_posid);
}
+#ifdef NOT_USED
bool
tidne(ItemPointer arg1, ItemPointer arg2)
{
BlockIdGetBlockNumber(&(arg2->ip_blkid)) ||
arg1->ip_posid != arg2->ip_posid);
}
+#endif
+#ifdef NOT_USED
text *
tid_text(ItemPointer tid)
{
return textin(str);
} /* tid_text() */
+#endif
+#ifdef NOT_USED
ItemPointer
text_tid(const text *string)
{
return result;
} /* text_tid() */
-
+#endif
/*
* Functions to get latest tid of a specified tuple.
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.27 2000/05/29 01:59:08 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.28 2000/06/08 22:37:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
static double time2t(const int hour, const int min, const double sec);
+static int EncodeSpecialTimestamp(Timestamp dt, char *str);
+static Timestamp dt2local(Timestamp dt, int timezone);
+static void dt2time(Timestamp dt, int *hour, int *min, double *sec);
+static int interval2tm(Interval span, struct tm * tm, float8 *fsec);
+static int tm2interval(struct tm * tm, double fsec, Interval *span);
/*****************************************************************************
return NULL;
if (TIMESTAMP_IS_RESERVED(*dt))
- {
EncodeSpecialTimestamp(*dt, buf);
-
- }
else if (timestamp2tm(*dt, &tz, tm, &fsec, &tzn) == 0)
- {
EncodeDateTime(tm, fsec, &tz, &tzn, DateStyle, buf);
-
- }
else
EncodeSpecialTimestamp(DT_INVALID, buf);
/* EncodeSpecialTimestamp()
* Convert reserved timestamp data type to string.
*/
-int
+static int
EncodeSpecialTimestamp(Timestamp dt, char *str)
{
if (TIMESTAMP_IS_RESERVED(dt))
return result;
}
-void
+static void
dt2time(Timestamp jd, int *hour, int *min, double *sec)
{
double time;
/* interval2tm()
* Convert a interval data type to a tm structure.
*/
-int
+static int
interval2tm(Interval span, struct tm * tm, float8 *fsec)
{
double time;
return 0;
} /* interval2tm() */
-int
+static int
tm2interval(struct tm * tm, double fsec, Interval *span)
{
span->month = ((tm->tm_year * 12) + tm->tm_mon);
return (((hour * 60) + min) * 60) + sec;
} /* time2t() */
-Timestamp
+static Timestamp
dt2local(Timestamp dt, int tz)
{
dt -= tz;
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.41 2000/04/12 17:15:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.42 2000/06/08 22:37:30 momjian Exp $
*
* NOTES
* Eventually, the index information should go through here, too.
/* ---------- RELATION CACHE ---------- */
+#ifdef NOT_USED
/*
* get_relnatts -
*
else
return InvalidAttrNumber;
}
+#endif
/*
* get_rel_name -
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.17 2000/01/26 05:57:26 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.18 2000/06/08 22:37:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#define S_IXOTH ((S_IXUSR)>>6)
#endif
+static int ValidateBinary(char *path);
+
/*
* ValidateBinary -- validate "path" as a POSTMASTER/POSTGRES executable file
*
* -1 if the regular file "path" does not exist or cannot be executed.
* -2 if the file is otherwise valid but cannot be read.
*/
-int
+static int
ValidateBinary(char *path)
{
struct stat buf;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.47 2000/06/02 15:57:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.48 2000/06/08 22:37:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "miscadmin.h"
#include "utils/syscache.h"
+static char *GetPidFname(void);
+
#ifdef CYR_RECODE
unsigned char RecodeForwTable[128];
/*
* Get path to the pid file
*/
-char *
+static char *
GetPidFname(void)
{
return (PidFile);
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: istrat.h,v 1.16 2000/01/26 05:57:50 momjian Exp $
+ * $Id: istrat.h,v 1.17 2000/06/08 22:37:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern StrategyNumber RelationGetStrategy(Relation relation,
AttrNumber attributeNumber, StrategyEvaluation evaluation,
RegProcedure procedure);
-extern bool RelationInvokeStrategy(Relation relation,
- StrategyEvaluation evaluation, AttrNumber attributeNumber,
- StrategyNumber strategy, Datum left, Datum right);
extern void IndexSupportInitialize(IndexStrategy indexStrategy,
RegProcedure *indexSupport, Oid indexObjectId,
Oid accessMethodObjectId, StrategyNumber maxStrategyNumber,
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: nbtree.h,v 1.35 2000/04/12 17:16:26 momjian Exp $
+ * $Id: nbtree.h,v 1.36 2000/06/08 22:37:38 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*/
extern InsertIndexResult _bt_doinsert(Relation rel, BTItem btitem,
bool index_is_unique, Relation heapRel);
-extern int32 _bt_tuplecompare(Relation rel, Size keysz, ScanKey scankey,
- IndexTuple tuple1, IndexTuple tuple2);
extern bool _bt_itemcmp(Relation rel, Size keysz, ScanKey scankey,
BTItem item1, BTItem item2, StrategyNumber strat);
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: xact.h,v 1.25 2000/06/05 07:28:57 tgl Exp $
+ * $Id: xact.h,v 1.26 2000/06/08 22:37:38 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern bool CommandIdGEScanCommandId(CommandId cid);
extern void CommandCounterIncrement(void);
extern void InitializeTransactionSystem(void);
-extern bool CurrentXactInProgress(void);
extern void StartTransactionCommand(void);
extern void CommitTransactionCommand(void);
extern void AbortCurrentTransaction(void);
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: c.h,v 1.73 2000/06/02 16:40:09 momjian Exp $
+ * $Id: c.h,v 1.74 2000/06/08 22:37:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#define LogAssertState(condition, printArgs) \
LogTrap(!(condition), BadState, printArgs)
-extern int assertEnable(int val);
-
#ifdef ASSERT_CHECKING_TEST
extern int assertTest(int val);
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: index.h,v 1.23 2000/04/12 17:16:27 momjian Exp $
+ * $Id: index.h,v 1.24 2000/06/08 22:37:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern bool IndexIsUnique(Oid indexId);
extern bool IndexIsUniqueNoCache(Oid indexId);
-extern bool activate_index(Oid indexId, bool activate);
extern bool reindex_index(Oid indexId, bool force);
extern bool activate_indexes_of_a_table(Oid relid, bool activate);
extern bool reindex_relation(Oid relid, bool force);
*------------------------------------------------------------------
*/
-void CreateComments(Oid oid, char *comment);
-void DeleteComments(Oid oid);
-void CommentObject(int objtype, char *objname, char *objproperty,
- List *objlist, char *comment);
+extern void DeleteComments(Oid oid);
+extern void CommentObject(int objtype, char *objname, char *objproperty,
+ List *objlist, char *comment);
#endif /* COMMENT_H */
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: trigger.h,v 1.20 2000/05/29 01:59:11 tgl Exp $
+ * $Id: trigger.h,v 1.21 2000/06/08 22:37:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern void DeferredTriggerSetState(ConstraintsSetStmt *stmt);
-extern void DeferredTriggerSaveEvent(Relation rel, int event,
- HeapTuple oldtup, HeapTuple newtup);
-
/*
* in utils/adt/ri_triggers.c
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeTidscan.h,v 1.3 2000/04/12 17:16:33 momjian Exp $
+ * $Id: nodeTidscan.h,v 1.4 2000/06/08 22:37:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern void ExecTidReScan(TidScan *node, ExprContext *exprCtxt, Plan *parent);
extern void ExecEndTidScan(TidScan *node);
extern void ExecTidMarkPos(TidScan *node);
-extern void ExecTidRestrPos(TidScan *node);
extern bool ExecInitTidScan(TidScan *node, EState *estate, Plan *parent);
extern int ExecCountSlotsTidScan(TidScan *node);
extern void ExecTidReScan(TidScan *node, ExprContext *exprCtxt, Plan *parent);
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: dllist.h,v 1.12 2000/04/12 17:16:34 momjian Exp $
+ * $Id: dllist.h,v 1.13 2000/06/08 22:37:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern Dlelem *DLGetHead(Dllist *);
extern Dlelem *DLGetTail(Dllist *);
extern Dlelem *DLRemTail(Dllist *l);
-extern Dlelem *DLGetPred(Dlelem *); /* get predecessor */
extern Dlelem *DLGetSucc(Dlelem *); /* get successor */
extern void DLRemove(Dlelem *); /* removes node from list */
extern void DLAddHead(Dllist *list, Dlelem *node);
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: miscadmin.h,v 1.57 2000/05/31 00:28:36 petere Exp $
+ * $Id: miscadmin.h,v 1.58 2000/06/08 22:37:35 momjian Exp $
*
* NOTES
* some of the information in this file will be moved to
extern void SetPgUserName(void);
extern int GetUserId(void);
extern void SetUserId(void);
-extern int ValidateBinary(char *path);
extern int FindExec(char *backend, char *argv0, char *binary_name);
extern int CheckPathAccess(char *path, char *name, int open_mode);
#define PIDFNAME "postmaster.pid"
extern void SetPidFname(char *datadir);
-extern char *GetPidFname(void);
extern void UnlinkPidFile(void);
extern int SetPidFile(pid_t pid);
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeFuncs.h,v 1.11 2000/01/26 05:58:16 momjian Exp $
+ * $Id: nodeFuncs.h,v 1.12 2000/06/08 22:37:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern bool var_is_outer(Var *var);
extern bool var_is_rel(Var *var);
extern Oper *replace_opid(Oper *oper);
-extern bool non_null(Expr *c);
#endif /* NODEFUNCS_H */
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: cost.h,v 1.33 2000/05/31 00:28:38 petere Exp $
+ * $Id: cost.h,v 1.34 2000/06/08 22:37:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern Selectivity clauselist_selectivity(Query *root,
List *clauses,
int varRelid);
-extern Selectivity clause_selectivity(Query *root,
- Node *clause,
- int varRelid);
#endif /* COST_H */
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: joininfo.h,v 1.15 2000/01/26 05:58:20 momjian Exp $
+ * $Id: joininfo.h,v 1.16 2000/06/08 22:37:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "nodes/relation.h"
-extern JoinInfo *joininfo_member(List *join_relids, List *joininfo_list);
extern JoinInfo *find_joininfo_node(RelOptInfo *this_rel, List *join_relids);
#endif /* JOININFO_H */
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: planmain.h,v 1.40 2000/05/31 00:28:38 petere Exp $
+ * $Id: planmain.h,v 1.41 2000/06/08 22:37:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
* prototypes for plan/createplan.c
*/
extern Plan *create_plan(Query *root, Path *best_path);
-extern SeqScan *make_seqscan(List *qptlist, List *qpqual, Index scanrelid);
extern Sort *make_sort(List *tlist, Oid nonameid, Plan *lefttree,
int keycount);
extern Agg *make_agg(List *tlist, List *qual, Plan *lefttree);
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: prep.h,v 1.21 2000/01/26 05:58:21 momjian Exp $
+ * $Id: prep.h,v 1.22 2000/06/08 22:37:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*/
extern List *canonicalize_qual(Expr *qual, bool removeAndFlag);
extern List *cnfify(Expr *qual, bool removeAndFlag);
-extern Expr *dnfify(Expr *qual);
/*
* prototypes for preptlist.c
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: tlist.h,v 1.25 2000/04/12 17:16:42 momjian Exp $
+ * $Id: tlist.h,v 1.26 2000/06/08 22:37:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "nodes/relation.h"
-extern TargetEntry *tlistentry_member(Node *node, List *targetlist);
-extern Node *matching_tlist_expr(Node *node, List *targetlist);
extern Resdom *tlist_member(Node *node, List *targetlist);
extern void add_var_to_tlist(RelOptInfo *rel, Var *var);
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_relation.h,v 1.17 2000/06/03 04:41:33 momjian Exp $
+ * $Id: parse_relation.h,v 1.18 2000/06/08 22:37:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
int *this_resno);
extern int attnameAttNum(Relation rd, char *a);
extern int specialAttNum(char *a);
-extern bool attnameIsSet(Relation rd, char *name);
-extern int attnumAttNelems(Relation rd, int attid);
extern Oid attnumTypeId(Relation rd, int attid);
extern void warnAutoRange(ParseState *pstate, char *refname);
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_type.h,v 1.13 2000/03/16 06:35:06 tgl Exp $
+ * $Id: parse_type.h,v 1.14 2000/06/08 22:37:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern Datum stringTypeDatum(Type tp, char *string, int32 atttypmod);
extern Oid typeidTypeRelid(Oid type_id);
extern Oid typeTypeRelid(Type typ);
-extern Oid typeTypElem(Type typ);
-extern Oid GetArrayElementType(Oid typearray);
-extern Oid typeInfunc(Type typ);
-extern Oid typeOutfunc(Type typ);
#define ISCOMPLEX(typeid) (typeidTypeRelid(typeid) != InvalidOid)
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: buffile.h,v 1.4 2000/04/12 17:16:51 momjian Exp $
+ * $Id: buffile.h,v 1.5 2000/06/08 22:37:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*/
extern BufFile *BufFileCreateTemp(void);
-extern BufFile *BufFileCreate(File file);
extern void BufFileClose(BufFile *file);
extern size_t BufFileRead(BufFile *file, void *ptr, size_t size);
extern size_t BufFileWrite(BufFile *file, void *ptr, size_t size);
extern int BufFileSeek(BufFile *file, int fileno, long offset, int whence);
-extern void BufFileTell(BufFile *file, int *fileno, long *offset);
extern int BufFileSeekBlock(BufFile *file, long blknum);
-extern long BufFileTellBlock(BufFile *file);
#endif /* BUFFILE_H */
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: lmgr.h,v 1.24 2000/01/26 05:58:33 momjian Exp $
+ * $Id: lmgr.h,v 1.25 2000/06/08 22:37:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* and this is for transactions */
extern void XactLockTableInsert(TransactionId xid);
-extern void XactLockTableDelete(TransactionId xid);
extern void XactLockTableWait(TransactionId xid);
/* proc.c */
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: tcopprot.h,v 1.28 2000/05/31 00:28:39 petere Exp $
+ * $Id: tcopprot.h,v 1.29 2000/06/08 22:37:56 momjian Exp $
*
* OLD COMMENTS
* This file was created so that other c files could get the two
Oid *typev, int nargs,
bool aclOverride);
extern Plan *pg_plan_query(Query *querytree);
-extern void pg_exec_query_acl_override(char *query_string);
extern void pg_exec_query_dest(char *query_string,
CommandDest dest,
bool aclOverride);
#endif /* BOOTSTRAP_INCLUDE */
extern void handle_warn(SIGNAL_ARGS);
-extern void quickdie(SIGNAL_ARGS);
extern void die(SIGNAL_ARGS);
-extern void FloatExceptionHandler(SIGNAL_ARGS);
extern void CancelQuery(void);
extern int PostgresMain(int argc, char *argv[],
int real_argc, char *real_argv[]);
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: builtins.h,v 1.113 2000/06/05 07:29:07 tgl Exp $
+ * $Id: builtins.h,v 1.114 2000/06/08 22:37:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern char *filename_out(char *s);
/* float.c */
-extern void CheckFloat8Val(double val); /* used by lex */
extern float32 float4in(char *num);
extern char *float4out(float32 num);
extern float64 float8in(char *num);
extern ItemPointer tidin(const char *str);
extern char *tidout(ItemPointer itemPtr);
extern bool tideq(ItemPointer, ItemPointer);
-extern bool tidne(ItemPointer, ItemPointer);
-extern text *tid_text(ItemPointer);
-extern ItemPointer text_tid(const text *);
extern ItemPointer currtid_byreloid(Oid relOid, ItemPointer);
extern ItemPointer currtid_byrelname(const text *relName, ItemPointer);
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: datetime.h,v 1.14 2000/05/29 19:16:56 tgl Exp $
+ * $Id: datetime.h,v 1.15 2000/06/08 22:37:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern int EncodeDateTime(struct tm * tm, double fsec, int *tzp, char **tzn, int style, char *str);
extern int EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str);
-extern int DecodeDate(char *str, int fmask, int *tmask, struct tm * tm);
-extern int DecodeNumber(int flen, char *field,
- int fmask, int *tmask,
- struct tm * tm, double *fsec, int *is2digits);
-extern int DecodeNumberField(int len, char *str,
- int fmask, int *tmask,
- struct tm * tm, double *fsec, int *is2digits);
extern int DecodeSpecial(int field, char *lowtoken, int *val);
-extern int DecodeTime(char *str, int fmask, int *tmask,
- struct tm * tm, double *fsec);
-extern int DecodeTimezone(char *str, int *tzp);
extern int DecodeUnits(int field, char *lowtoken, int *val);
-extern datetkn *datebsearch(char *key, datetkn *base, unsigned int nel);
extern int j2day(int jd);
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: lsyscache.h,v 1.23 2000/04/12 17:16:55 momjian Exp $
+ * $Id: lsyscache.h,v 1.24 2000/06/08 22:37:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern RegProcedure get_oprrest(Oid opid);
extern RegProcedure get_oprjoin(Oid opid);
extern Oid get_func_rettype(Oid funcid);
-extern int get_relnatts(Oid relid);
extern char *get_rel_name(Oid relid);
extern struct varlena *get_relstub(Oid relid, int no, bool *islast);
extern Oid get_ruleid(char *rulename);
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: timestamp.h,v 1.4 2000/04/12 17:16:56 momjian Exp $
+ * $Id: timestamp.h,v 1.5 2000/06/08 22:37:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
extern int timestamp2tm(Timestamp dt, int *tzp, struct tm * tm, double *fsec, char **tzn);
extern Timestamp SetTimestamp(Timestamp timestamp);
-extern Timestamp dt2local(Timestamp dt, int timezone);
-extern void dt2time(Timestamp dt, int *hour, int *min, double *sec);
-extern int EncodeSpecialTimestamp(Timestamp dt, char *str);
-extern int interval2tm(Interval span, struct tm * tm, float8 *fsec);
-extern int tm2interval(struct tm * tm, double fsec, Interval *span);
extern Timestamp *now(void);
#endif /* TIMESTAMP_H */
do
nm $FILE | cut -c10-100 |awk '{printf "%s\t%s\t%s\n", "'"$FILE"'",$1,$2}'
done >/tmp/$$
-destroydb debug
+dropdb debug
createdb debug
echo "
create table debug (file text, scope char, func text);
select *
from debug2
- where scope = 'T';
+ where scope = 'T'
+ order by file, func;
" |psql debug