Datum *d;
bool *nulls;
int nb, nh, ni;
+#ifndef OMIT_PARTIAL_INDEX
ExprContext *econtext;
TupleTable tupleTable;
TupleTableSlot *slot;
+#endif
Oid hrelid, irelid;
Node *pred, *oldPred;
GISTSTATE giststate;
econtext = makeNode(ExprContext);
FillDummyExprContext(econtext, slot, hd, buffer);
}
+ else /* shut the compiler up */
+ {
+ tupleTable = NULL;
+ slot = NULL;
+ econtext = NULL;
+ }
#endif /* OMIT_PARTIAL_INDEX */
scan = heap_beginscan(heap, 0, NowTimeQual, 0, (ScanKey) NULL);
htup = heap_getnext(scan, 0, &buffer);
(StrategyTransformMap) GISTNegate, /* how to do (not qual) */
(StrategyTransformMap) GISTCommute, /* how to swap operands */
(StrategyTransformMap) GISTNegateCommute, /* how to do both */
- NULL
+ { NULL }
};
StrategyNumber
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.5 1996/10/21 05:45:11 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.6 1996/10/23 07:38:29 scrappy Exp $
*
* NOTES
* This file contains only the public interface routines.
int nhtups, nitups;
int i;
HashItem hitem;
+#ifndef OMIT_PARTIAL_INDEX
ExprContext *econtext;
TupleTable tupleTable;
TupleTableSlot *slot;
+#endif
Oid hrelid, irelid;
Node *pred, *oldPred;
econtext = makeNode(ExprContext);
FillDummyExprContext(econtext, slot, htupdesc, buffer);
}
+ else /* quiet the compiler */
+ {
+ econtext = NULL;
+ tupleTable = 0;
+ slot = 0;
+ }
#endif /* OMIT_PARTIAL_INDEX */
/* start a heap scan */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.4 1996/10/21 05:45:14 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.5 1996/10/23 07:38:32 scrappy Exp $
*
* NOTES
* Overflow pages look like ordinary relation pages.
_hash_getovfladdr(Relation rel, Buffer *metabufp)
{
HashMetaPage metap;
- Buffer mapbuf;
+ Buffer mapbuf = 0;
BlockNumber blkno;
PageOffset offset;
OverflowPageAddress oaddr;
SplitNumber splitnum;
- uint32 *freep;
+ uint32 *freep = NULL;
uint32 max_free;
uint32 bit;
uint32 first_page;
* XXX this should look like:
* - lock prev/next
* - modify/write prev/next (how to do write ordering with a
- * doubly-linked list???)
+ * doubly-linked list?)
* - unlock prev/next
*/
if (BlockNumberIsValid(prevblkno)) {
Bucket bucket)
{
Buffer wbuf;
- Buffer rbuf;
+ Buffer rbuf = 0;
BlockNumber wblkno;
BlockNumber rblkno;
Page wpage;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.3 1996/10/21 07:38:20 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.4 1996/10/23 07:38:43 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
Datum right)
{
Index index;
- long tmpres;
- bool result;
+ long tmpres = 0;
+ bool result = 0;
StrategyOperator operator;
ScanKey entry;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.2 1996/10/20 10:53:02 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.3 1996/10/23 07:38:54 scrappy Exp $
*
* NOTES
* These functions are stored in pg_amproc. For each operator class
*-------------------------------------------------------------------------
*/
-#include "postgres.h"
+#include
#include
+
+#include "postgres.h"
#include "utils/nabstime.h"
int32
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.2 1996/10/20 10:53:03 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.3 1996/10/23 07:39:00 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
+#include
+#include
+
#include "postgres.h"
#include "catalog/pg_attribute.h"
#include "storage/itemid.h"
#include "storage/item.h"
#include "storage/bufpage.h"
-#include
#include "utils/nabstime.h"
+#include "utils/palloc.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/nbtree.h"
-#include
#include "storage/ipc.h"
#include "storage/bufmgr.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.2 1996/10/20 10:53:06 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.3 1996/10/23 07:39:04 scrappy Exp $
*
* NOTES
* Postgres btree pages look like ordinary relation pages. The opaque
*
*-------------------------------------------------------------------------
*/
+#include
+#include
#include "postgres.h"
#include "utils/rel.h"
#include "storage/buf.h"
-
#include "storage/block.h"
#include "storage/off.h"
#include "storage/itemptr.h"
#include "storage/itemid.h"
#include "storage/item.h"
#include "storage/bufpage.h"
-#include
#include "utils/nabstime.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "access/sdir.h"
#include "access/nbtree.h"
-#include
#include "storage/ipc.h"
#include "storage/bufmgr.h"
+#include "storage/lmgr.h"
#define BTREE_METAPAGE 0
#define BTREE_MAGIC 0x053162
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.4 1996/10/20 10:53:08 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.5 1996/10/23 07:39:06 scrappy Exp $
*
* NOTES
* This file contains only the public interface routines.
*
*-------------------------------------------------------------------------
*/
+#include
+#include
#include "postgres.h"
#include "storage/fd.h"
#include "catalog/pg_am.h"
#include "catalog/pg_class.h"
+#include "catalog/index.h"
#include "nodes/nodes.h"
#include "rewrite/prs2lock.h"
#include "access/skey.h"
#include "storage/item.h"
#include "storage/buf.h"
#include "storage/bufpage.h"
-#include
+#include "storage/bufmgr.h"
#include "utils/nabstime.h"
#include "access/htup.h"
#include "utils/tqual.h"
+#include "utils/palloc.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/nbtree.h"
#include "nodes/parsenodes.h"
#include "tcop/dest.h"
#include "executor/execdesc.h"
-#include
#include "catalog/pg_index.h"
#include "executor/executor.h"
TupleDesc htupdesc, itupdesc;
Datum *attdata;
bool *nulls;
- InsertIndexResult res;
+ InsertIndexResult res = 0;
int nhtups, nitups;
int i;
BTItem btitem;
+#ifndef OMIT_PARTIAL_INDEX
ExprContext *econtext;
TupleTable tupleTable;
TupleTableSlot *slot;
+#endif
Oid hrelid, irelid;
Node *pred, *oldPred;
void *spool;
econtext = makeNode(ExprContext);
FillDummyExprContext(econtext, slot, htupdesc, InvalidBuffer);
}
+ else
+ {
+ econtext = NULL;
+ tupleTable = NULL;
+ slot = NULL;
+ }
#endif /* OMIT_PARTIAL_INDEX */
/* start a heap scan */
spool = _bt_spoolinit(index, 7);
res = (InsertIndexResult) NULL;
}
+ else
+ spool = NULL;
for (; HeapTupleIsValid(htup); htup = heap_getnext(hscan, 0, &buffer)) {
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.2 1996/10/20 10:53:10 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.3 1996/10/23 07:39:08 scrappy Exp $
*
*
* NOTES
#include "utils/nabstime.h"
#include "access/htup.h"
#include "utils/tqual.h"
+#include "utils/palloc.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/nbtree.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.3 1996/10/20 10:53:11 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.4 1996/10/23 07:39:10 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
+#include
+
#include "postgres.h"
#include "catalog/pg_attribute.h"
#include "storage/item.h"
#include "storage/buf.h"
#include "storage/bufpage.h"
-#include
+#include "storage/bufmgr.h"
#include "utils/nabstime.h"
#include "access/htup.h"
#include "utils/tqual.h"
+#include "utils/palloc.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/nbtree.h"
+#include "access/genam.h"
+
+#include "fmgr.h"
static BTStack _bt_searchr(Relation rel, int keysz, ScanKey scankey, Buffer *bufP, BTStack stack_in);
static OffsetNumber _bt_firsteq(Relation rel, TupleDesc itupdesc, Page page, Size keysz, ScanKey scankey, OffsetNumber offnum);
Page page;
BTPageOpaque opaque;
OffsetNumber low, mid, high;
- bool match;
int result;
page = BufferGetPage(buf);
opaque = (BTPageOpaque) PageGetSpecialPointer(page);
/* by convention, item 0 on any non-rightmost page is the high key */
- low = P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY;
+ low = mid = P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY;
high = PageGetMaxOffsetNumber(page);
return (low);
itupdesc = RelationGetTupleDescriptor(rel);
- match = false;
while ((high - low) > 1) {
mid = low + ((high - low) / 2);
low = mid;
else if (result < 0)
high = mid - 1;
- else {
- match = true;
- break;
- }
- }
-
- /* if we found a match, we want to find the first one on the page */
- if (match) {
+ else
return (_bt_firsteq(rel, itupdesc, page, keysz, scankey, mid));
- } else {
+ }
/*
* We terminated because the endpoints got too close together. There
return (OffsetNumberNext(high));
}
}
- }
}
static OffsetNumber
ItemPointer current;
ItemPointer iptr;
OffsetNumber offnum, maxoff;
- OffsetNumber start;
+ OffsetNumber start = 0;
BlockNumber blkno;
BTItem btitem;
IndexTuple itup;
*
*
* IDENTIFICATION
- * $Id: nbtsort.c,v 1.4 1996/10/20 10:53:13 scrappy Exp $
+ * $Id: nbtsort.c,v 1.5 1996/10/23 07:39:11 scrappy Exp $
*
* NOTES
*
*-------------------------------------------------------------------------
*/
+#include
+#include
+#include
+
#include "postgres.h"
#include "catalog/pg_attribute.h"
#include "storage/item.h"
#include "storage/buf.h"
#include "storage/bufpage.h"
-#include
#include "utils/nabstime.h"
#include "access/htup.h"
#include "utils/tqual.h"
+#include "utils/palloc.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/nbtree.h"
-#include
-#include
-
#include "storage/ipc.h"
#include "storage/bufmgr.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.3 1996/10/20 10:53:18 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.4 1996/10/23 07:39:15 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
+#include
+
#include "postgres.h"
#include "catalog/pg_attribute.h"
#include "storage/item.h"
#include "storage/buf.h"
#include "storage/bufpage.h"
-#include
#include "utils/nabstime.h"
#include "access/htup.h"
#include "utils/tqual.h"
+#include "utils/palloc.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/nbtree.h"
-
#include "access/istrat.h"
+#include "access/genam.h"
+#include "access/iqual.h"
+
+#include "fmgr.h"
ScanKey
_bt_mkscankey(Relation rel, IndexTuple itup)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtget.c,v 1.2 1996/10/20 09:27:04 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtget.c,v 1.3 1996/10/23 07:39:20 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
+#include
+#include
+
#include "postgres.h"
#include "catalog/pg_attribute.h"
#include "storage/block.h"
#include "storage/off.h"
#include "storage/itemptr.h"
-#include
#include "utils/nabstime.h"
#include "access/htup.h"
#include "utils/tqual.h"
+#include "utils/palloc.h"
#include "storage/buf.h"
#include "access/relscan.h"
+#include "access/iqual.h"
#include "storage/itemid.h"
#include "storage/item.h"
#include "storage/bufpage.h"
+#include "storage/bufmgr.h"
#include "access/itup.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.2 1996/10/20 09:27:06 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.3 1996/10/23 07:39:23 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
+#include
+
#include "postgres.h"
#include "utils/geo-decls.h"
-
+#include "utils/palloc.h"
BOX
*rt_box_union(BOX *a, BOX *b)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.4 1996/10/20 09:27:07 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.5 1996/10/23 07:39:24 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
+#include
+#include
+
#include "postgres.h"
#include "catalog/pg_attribute.h"
#include "storage/fd.h"
#include "catalog/pg_am.h"
#include "catalog/pg_class.h"
+#include "catalog/index.h"
#include "nodes/nodes.h"
#include "rewrite/prs2lock.h"
#include "access/skey.h"
#include "storage/block.h"
#include "storage/off.h"
#include "storage/itemptr.h"
-#include
#include "utils/nabstime.h"
#include "access/htup.h"
#include "access/itup.h"
#include "utils/tqual.h"
+#include "utils/palloc.h"
#include "storage/buf.h"
#include "access/relscan.h"
+#include "access/rtscan.h"
#include "storage/itemid.h"
#include "storage/item.h"
#include "storage/bufpage.h"
+#include "storage/lmgr.h"
#include "access/rtree.h"
-
#include "access/funcindex.h"
#include "nodes/params.h"
#include "executor/tuptable.h"
#include "nodes/execnodes.h"
-#include
#include "storage/ipc.h"
#include "storage/bufmgr.h"
Datum *d;
bool *nulls;
int nb, nh, ni;
+#ifndef OMIT_PARTIAL_INDEX
ExprContext *econtext;
TupleTable tupleTable;
TupleTableSlot *slot;
+#endif
Oid hrelid, irelid;
Node *pred, *oldPred;
RTSTATE rtState;
econtext = makeNode(ExprContext);
FillDummyExprContext(econtext, slot, hd, buffer);
}
+ else
+ {
+ econtext = NULL;
+ tupleTable = NULL;
+ slot = NULL;
+ }
#endif /* OMIT_PARTIAL_INDEX */
scan = heap_beginscan(heap, 0, NowTimeQual, 0, (ScanKey) NULL);
htup = heap_getnext(scan, 0, &buffer);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.4 1996/10/20 09:27:10 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.5 1996/10/23 07:39:26 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
+#include
+#include
+
#include "postgres.h"
#include "catalog/pg_attribute.h"
#include "storage/block.h"
#include "storage/off.h"
#include "storage/itemptr.h"
-#include
#include "utils/nabstime.h"
+#include "utils/palloc.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "storage/buf.h"
+#include "storage/lmgr.h"
+#include "storage/bufmgr.h"
#include "access/relscan.h"
#include "access/rtree.h"
+#include "access/rtstrat.h"
#include "access/itup.h"
#include "access/funcindex.h"
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.3 1996/10/21 07:15:06 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.4 1996/10/23 07:39:32 scrappy Exp $
*
* NOTES
* This file contains support functions for the high
TransactionId transactionId, /* transaction id to test */
BlockNumber *blockNumberOutP)
{
- long itemsPerBlock;
+ long itemsPerBlock = 0;
/* ----------------
* we calculate the block number of our transaction
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.3 1996/10/21 08:31:21 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.4 1996/10/23 07:39:39 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
+#include
+
#include "postgres.h"
#include "storage/block.h"
#include "bootstrap/bootstrap.h"
#include "nodes/primnodes.h"
-#include
#include "utils/nabstime.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "bootstrap_tokens.h"
+#define YY_NO_UNPUT
+
/* some versions of lex define this as a macro */
#if defined(yywrap)
#undef yywrap
%%
-yywrap()
+int
+yywrap(void)
{
return 1;
}
-yyerror(str)
- char *str;
+void
+yyerror(const char *str)
{
fprintf(stderr,"\tsyntax error %d : %s",yyline, str);
}
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.8 1996/10/21 08:31:23 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.9 1996/10/23 07:39:42 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
+#include
+#include
+#include
+#include
+
#define BOOTSTRAP_INCLUDE /* mask out stuff in tcop/tcopprot.h */
#include "postgres.h"
#include "access/strat.h"
#include "utils/rel.h"
-#include
#include "storage/block.h"
#include "storage/off.h"
#include "storage/itemptr.h"
#include "nodes/memnodes.h"
-#include
-#include
-#include
-
#include "miscadmin.h"
#include "catalog/pg_type.h"
#define ALLOC(t, c) (t *)calloc((unsigned)(c), sizeof(t))
#define FIRST_TYPE_OID 16 /* OID of the first type */
+ extern int Int_yyparse (void);
+
/* ----------------
* global variables
* ----------------
* error handling / abort routines
* ----------------
*/
-void err_out()
+void
+err_out(void)
{
Warnings++;
cleanup();
usage help for the bootstrap backen
*/
static void
-usage()
+usage(void)
{
fprintf(stderr,"Usage: postgres -boot [-d] [-C] [-F] [-O] [-Q] ");
fprintf(stderr,"[-P portno] [dbName]\n");
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.9 1996/10/21 09:37:26 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.10 1996/10/23 07:39:53 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
Oid *elements;
Datum value;
bool isnull = (bool) true;
- char *nulls;
+ char *nulls = NULL;
char *string;
int32 ntuples;
TupleDesc tupDesc;
tupDesc = rel->rd_att;
if (!binary) {
- out_functions = (func_ptr *)
- palloc(attr_count * sizeof(func_ptr));
+ out_functions = (func_ptr *) palloc(attr_count * sizeof(func_ptr));
elements = (Oid *) palloc(attr_count * sizeof(Oid));
for (i = 0; i < attr_count; i++) {
out_func_oid = (Oid) GetOutputFunction(attr[i]->atttypid);
elements[i] = GetTypeElement(attr[i]->atttypid);
}
}else {
+ elements = NULL;
+ out_functions = NULL;
nulls = (char *) palloc(attr_count);
for (i = 0; i < attr_count; i++) nulls[i] = ' ';
bool isnull;
bool has_index;
int done = 0;
- char *string, *ptr;
+ char *string = NULL, *ptr;
Relation *index_rels;
int32 len, null_ct, null_id;
int32 ntuples, tuples_read = 0;
bool reading_to_eof = true;
Oid *elements;
- FuncIndexInfo *finfo, **finfoP;
+ FuncIndexInfo *finfo, **finfoP = NULL;
TupleDesc *itupdescArr;
HeapTuple pgIndexTup;
- IndexTupleForm *pgIndexP;
- int *indexNatts;
+ IndexTupleForm *pgIndexP = NULL;
+ int *indexNatts = NULL;
char *predString;
- Node **indexPred;
+ Node **indexPred = NULL;
TupleDesc rtupdesc;
- ExprContext *econtext;
+ ExprContext *econtext = NULL;
+#ifndef OMIT_PARTIAL_INDEX
TupleTable tupleTable;
- TupleTableSlot *slot;
+ TupleTableSlot *slot = NULL;
+#endif
int natts;
AttrNumber *attnumP;
Datum idatum;
}
else
{
+ in_functions = NULL;
+ elements = NULL;
fread(&ntuples, sizeof(int32), 1, fp);
if (ntuples != 0) reading_to_eof = false;
}
if (len && (string[0] == '{') && (string[len-1] == '}'))
is_array = true;
- for ( ; c = *string; string++) {
+ for ( ; (c = *string) != 0; string++) {
if (c == delim[0] || c == '\n' ||
(c == '\\' && !is_array))
fputc('\\', fp);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.4 1996/08/26 06:30:23 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.5 1996/10/23 07:39:57 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
* -- JMH, 7/22/96
*/
foreach(pl, parameterList) {
- int count;
- char *ptr;
ParamString *param = (ParamString*)lfirst(pl);
if (!strcasecmp(param->name, "islossy"))
}
-
/*
* Convert the partial-index predicate from parsetree form to plan
* form, so it can be readily evaluated during index creation.
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.1.1.1 1996/07/09 06:21:20 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.2 1996/10/23 07:40:01 scrappy Exp $
*
* DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the
#include "catalog/pg_aggregate.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
+#include "catalog/pg_operator.h"
#include "utils/syscache.h"
#include "nodes/pg_list.h"
#include "nodes/parsenodes.h"
char* prosrc_str;
char *prorettype;
char *languageName;
- bool canCache;
- bool trusted = TRUE;
+ bool canCache = FALSE;
List *argList;
- int32 byte_pct, perbyte_cpu, percall_cpu, outin_ratio;
+ int32 byte_pct = 100, perbyte_cpu, percall_cpu, outin_ratio = 100;
bool returnsSet;
int i;
List *pl;
/* the defaults */
- canCache = FALSE;
byte_pct = BYTE_PCT;
perbyte_cpu = PERBYTE_CPU;
percall_cpu = PERCALL_CPU;
}
}
} else if (!strcmp(languageName, "sql")) {
- canCache = false;
- trusted = true;
-
/* query optimizer groks sql, these are meaningless */
perbyte_cpu = percall_cpu = 0;
- byte_pct = outin_ratio = 100;
} else {
elog(WARN, "DefineFunction: language '%s' is not supported",
languageName);
prosrc_str, /* converted to text later */
probin_str, /* converted to text later */
canCache,
- trusted,
+ TRUE,
byte_pct,
perbyte_cpu,
percall_cpu,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.1.1.1 1996/07/09 06:21:21 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.2 1996/10/23 07:40:08 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
+#include
+
#include "postgres.h"
#include "parser/catalog_utils.h"
#include "parser/parse_query.h" /* for MakeTimeRange() */
pname = "Tee";
break;
default:
+ pname = NULL;
break;
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.2 1996/08/19 01:53:39 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.3 1996/10/23 07:40:09 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
Buffer buffer = InvalidBuffer;
bool bufferUsed = FALSE;
Oid argList[8];
- Form_pg_proc the_proc;
+ Form_pg_proc the_proc = NULL;
ItemPointerData itemPointerData;
static ScanKeyData key[3] = {
{ 0, Anum_pg_proc_proname, NameEqualRegProcedure }
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.4 1996/10/18 08:13:36 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.5 1996/10/23 07:40:10 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "storage/bufmgr.h"
#include "storage/bufpage.h"
#include "storage/smgr.h"
+#include "storage/lmgr.h"
#include "utils/elog.h"
#include "utils/mcxt.h"
Buffer buf;
PortalVariableMemory portalmem;
MemoryContext old;
- VRelList vrl, cur;
+ VRelList vrl, cur = NULL;
Datum d;
char *rname;
char rkind;
Buffer buf;
Page page;
OffsetNumber offnum, maxoff;
- Relation archrel;
+ Relation archrel = NULL;
bool isarchived;
int nvac;
int ntups;
{
VRelList p_vrl;
VAttList p_val, val;
- VPageDescr p_vpd, *vpd;
+ VPageDescr *vpd;
int i;
MemoryContext old;
PortalVariableMemory pmem;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.4 1996/09/19 19:57:18 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.5 1996/10/23 07:40:26 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "executor/executor.h"
+#include "executor/nodeIndexscan.h"
#include "utils/builtins.h"
#include "utils/palloc.h"
#include "utils/acl.h"
destination);
break;
default:
+ result = NULL;
elog(DEBUG, "ExecutorRun: Unknown feature %d", feature);
break;
}
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: miscadmin.h,v 1.4 1996/10/07 03:28:12 scrappy Exp $
+ * $Id: miscadmin.h,v 1.5 1996/10/23 07:40:32 scrappy Exp $
*
* NOTES
* some of the information in this file will be moved to
#ifndef MISCADMIN_H
#define MISCADMIN_H
-/* ----------------
- * note: was in unix.h This should be moved
- * to the .c files.
- * ----------------
- */
-#include
-
-#include "postgres.h"
-#include "storage/backendid.h"
-
/*****************************************************************************
* globals.h -- *
*****************************************************************************/
#include
#include
+#include "port-protos.h"
+
static char error_message[BUFSIZ];
char *
}
void *
-BSD44_derived_dlopen(char *file, int num)
+BSD44_derived_dlopen(const char *file, int num)
{
#ifdef __mips__
(void) sprintf(error_message, "dlopen (%s) not supported", file);
}
void *
-BSD44_derived_dlsym(void *handle, char *name)
+BSD44_derived_dlsym(void *handle, const char *name)
{
#ifdef __mips__
(void) sprintf(error_message, "dlsym (%s) failed", name);
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: port-protos.h,v 1.1.1.1 1996/07/09 06:21:42 scrappy Exp $
+ * $Id: port-protos.h,v 1.2 1996/10/23 07:40:45 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#define pg_dlclose BSD44_derived_dlclose
#define pg_dlerror BSD44_derived_dlerror
+char * BSD44_derived_dlerror(void);
+void * BSD44_derived_dlopen(const char *filename, int num);
+void * BSD44_derived_dlsym(void *handle, const char *name);
+void * BSD44_derived_dlsym(void *handle, const char *name);
+void BSD44_derived_dlclose(void *handle);
+
#endif /* PORT_PROTOS_H */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.1.1.1 1996/07/09 06:22:06 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.2 1996/10/23 07:41:00 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
static void formrdesc(char *relationName, u_int natts,
FormData_pg_attribute att[]);
+#if 0 /* See comments at line 1304 */
static void RelationFlushIndexes(Relation *r, Oid accessMethodId);
+#endif
-static char *BuildDescInfoError(RelationBuildDescInfo buildinfo);
static HeapTuple ScanPgRelation(RelationBuildDescInfo buildinfo);
static HeapTuple scan_pg_rel_seq(RelationBuildDescInfo buildinfo);
static HeapTuple scan_pg_rel_ind(RelationBuildDescInfo buildinfo);
*/
+#if 0 /* XXX This doesn't seem to be used anywhere */
/* --------------------------------
* BuildDescInfoError returns a string appropriate to
* the buildinfo passed to it
return errBuf;
}
+#endif
/* --------------------------------
* ScanPgRelation
default:
elog(WARN, "ScanPgRelation: bad buildinfo");
+ /* XXX I hope this is right. It seems better than returning
+ * an uninitialized value */
+ return_tuple = NULL;
}
/* all done */
rule->ruleId = pg_rewrite_tuple->t_oid;
- /* XXX too lazy to fix the type cast problem
- * (see rewriteDefine.c:121)
- */
rule->event =
- (CmdType)((char)heap_getattr(pg_rewrite_tuple, InvalidBuffer,
+ (int)heap_getattr(pg_rewrite_tuple, InvalidBuffer,
Anum_pg_rewrite_ev_type, pg_rewrite_tupdesc,
- &isnull) - 48);
+ &isnull) - 48;
rule->attrno =
- (AttrNumber)heap_getattr(pg_rewrite_tuple, InvalidBuffer,
+ (int)heap_getattr(pg_rewrite_tuple, InvalidBuffer,
Anum_pg_rewrite_ev_attr, pg_rewrite_tupdesc,
&isnull);
rule->isInstead =
- (bool)heap_getattr(pg_rewrite_tuple, InvalidBuffer,
+ !!heap_getattr(pg_rewrite_tuple, InvalidBuffer,
Anum_pg_rewrite_is_instead, pg_rewrite_tupdesc,
&isnull);
}
}
+#if 0 /* See comments at line 1304 */
/* --------------------------------
* RelationIdInvalidateRelationCacheByAccessMethodId
*
RelationFlushRelation(&relation, false);
}
}
+#endif
+
void
RelationIdInvalidateRelationCacheByAccessMethodId(Oid accessMethodId)
#ifndef GIST_H
#define GIST_H
+#include "utils/rel.h"
+#include "storage/off.h"
+#include "storage/block.h"
#include "storage/bufpage.h"
-
+#include "access/skey.h"
/*
** You can have as many strategies as you please in GiSTs, as
Relation r, Page pg, OffsetNumber o, int b, bool l) ;
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);
#endif /* GIST_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: iqual.h,v 1.1 1996/08/27 21:50:16 scrappy Exp $
+ * $Id: iqual.h,v 1.2 1996/10/23 07:41:27 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "storage/itemid.h"
#include "utils/rel.h"
#include "access/skey.h"
+#include "access/itup.h"
/* ----------------
* index tuple qualification support
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nbtree.h,v 1.1 1996/08/27 21:50:19 scrappy Exp $
+ * $Id: nbtree.h,v 1.2 1996/10/23 07:41:29 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "access/relscan.h"
#include "access/sdir.h"
#include "nodes/pg_list.h"
+#include "storage/page.h"
+#include "storage/bufpage.h"
+#include "storage/item.h"
+#include "utils/memutils.h"
/*
* BTPageOpaqueData -- At the end of every page, we store a pointer
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: relscan.h,v 1.2 1996/10/19 06:27:08 scrappy Exp $
+ * $Id: relscan.h,v 1.3 1996/10/23 07:41:30 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#define RELSCAN_H
#include "utils/tqual.h"
+#include "utils/rel.h"
#include "storage/buf.h"
-
-
-
typedef ItemPointerData MarkData;
typedef struct HeapScanDescData {
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: transam.h,v 1.1 1996/08/27 21:50:26 scrappy Exp $
+ * $Id: transam.h,v 1.2 1996/10/23 07:41:31 scrappy Exp $
*
* NOTES
* Transaction System Version 101 now support proper oid
#ifndef TRANSAM_H
#define TRANSAM_H
+#include "utils/nabstime.h"
+#include "utils/rel.h"
+#include "storage/bufmgr.h"
+
/* ----------------
* transaction system version id
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeIndexscan.h,v 1.1 1996/08/28 07:22:20 scrappy Exp $
+ * $Id: nodeIndexscan.h,v 1.2 1996/10/23 07:41:34 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
extern int ExecCountSlotsIndexScan(IndexScan *node);
+extern void ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan* parent);
#endif /* NODEINDEXSCAN_H */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: tuptable.h,v 1.1 1996/08/28 07:22:28 scrappy Exp $
+ * $Id: tuptable.h,v 1.2 1996/10/23 07:41:36 scrappy Exp $
*
* NOTES
* The tuple table interface is getting pretty ugly.
#ifndef TUPTABLE_H
#define TUPTABLE_H
+#include "access/htup.h"
+#include "access/relscan.h"
+
/* ----------------
* Note: the executor tuple table is managed and manipulated by special
* code and macros in executor/execTuples.c and tupTable.h
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: libpq.h,v 1.2 1996/10/20 21:51:45 scrappy Exp $
+ * $Id: libpq.h,v 1.3 1996/10/23 07:41:41 scrappy Exp $
*
* NOTES
* This file contains definitions for structures and
#ifndef LIBPQ_H
#define LIBPQ_H
+#include
+
+#include "libpq/pqcomm.h"
+
/* ----------------
* PQArgBlock --
* Information (pointer to array of this structure) required
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pqcomm.h,v 1.2 1996/10/11 09:12:18 bryanh Exp $
+ * $Id: pqcomm.h,v 1.3 1996/10/23 07:41:47 scrappy Exp $
*
* NOTES
* Some of this should move to libpq.h
#ifndef PQCOMM_H
#define PQCOMM_H
+#include
#include
+
#ifdef WIN32
#include
#else
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: execnodes.h,v 1.3 1996/10/20 06:35:07 scrappy Exp $
+ * $Id: execnodes.h,v 1.4 1996/10/23 07:41:56 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "nodes/params.h"
#include "access/sdir.h"
+#include "access/funcindex.h"
#include "executor/hashjoin.h"
#include "nodes/primnodes.h"
#include "nodes/memnodes.h"
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: primnodes.h,v 1.3 1996/10/19 04:48:30 scrappy Exp $
+ * $Id: primnodes.h,v 1.4 1996/10/23 07:42:02 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef PRIMNODES_H
#define PRIMNODES_H
+#include "nodes/pg_list.h"
+#include "nodes/nodes.h"
+#include "access/attnum.h"
+
#include "utils/fcache.h"
/* ----------------------------------------------------------------
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: bufpage.h,v 1.4 1996/10/20 06:35:16 scrappy Exp $
+ * $Id: bufpage.h,v 1.5 1996/10/23 07:42:07 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "storage/itemid.h"
#include "storage/item.h"
#include "storage/buf.h"
+#include "storage/page.h"
#include "storage/off.h"
/*
* initialize its pages with PageInit and then set its own opaque
* fields.
*/
-typedef Pointer Page;
/*
* PageIsValid --
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: tqual.h,v 1.2 1996/10/20 06:35:27 scrappy Exp $
+ * $Id: tqual.h,v 1.3 1996/10/23 07:42:13 scrappy Exp $
*
* NOTE
* It may be desirable to allow time qualifications to indicate
#define TQUAL_H
#include "utils/nabstime.h"
+#include "access/htup.h"
typedef struct TimeQualSpace {
char data[12];