*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.51 2000/03/01 05:39:20 inoue Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.52 2000/03/17 02:36:00 tgl Exp $
*
*-------------------------------------------------------------------------
*/
char *datum = (((char *) t) + sizeof(IndexTupleData));
/* if new entry fits in index tuple, copy it in */
- if (entry.bytes < IndexTupleSize(t) - sizeof(IndexTupleData))
+ if ((Size) entry.bytes < IndexTupleSize(t) - sizeof(IndexTupleData))
{
memcpy(datum, entry.pred, entry.bytes);
/* clear out old size */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.19 2000/01/26 05:55:55 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.20 2000/03/17 02:36:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
Page page;
BlockNumber itup_blkno;
OffsetNumber itup_off;
- int itemsz;
+ Size itemsz;
HashPageOpaque pageopaque;
bool do_expand = false;
Buffer ovflbuf;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.26 2000/01/26 05:55:55 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.27 2000/03/17 02:36:02 tgl Exp $
*
* NOTES
* Overflow pages look like ordinary relation pages.
}
/* Check if we need to allocate a new bitmap page */
- if (free_bit == BMPGSZ_BIT(metap) - 1)
+ if (free_bit == (uint32) (BMPGSZ_BIT(metap) - 1))
{
/* won't be needing old map page */
OffsetNumber woffnum;
OffsetNumber roffnum;
HashItem hitem;
- int itemsz;
+ Size itemsz;
/* elog(DEBUG, "_hash_squeezebucket: squeezing bucket %d", bucket); */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.26 2000/01/26 05:55:55 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.27 2000/03/17 02:36:02 tgl Exp $
*
* NOTES
* Postgres hash pages look like ordinary relation pages. The opaque
HashPageOpaque nopaque;
HashMetaPage metap;
IndexTuple itup;
- int itemsz;
+ Size itemsz;
OffsetNumber ooffnum;
OffsetNumber noffnum;
OffsetNumber omaxoffnum;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.22 2000/01/26 05:55:55 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.23 2000/03/17 02:36:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
opaque = (HashPageOpaque) PageGetSpecialPointer(page);
Assert(opaque->hasho_bucket == bucket);
while (PageIsEmpty(page) &&
- BlockNumberIsValid(opaque->hasho_nextblkno))
+ BlockNumberIsValid(opaque->hasho_nextblkno))
_hash_readnext(rel, &buf, &page, &opaque);
maxoff = PageGetMaxOffsetNumber(page);
offnum = FirstOffsetNumber;
*
*
* IDENTIFICATION
- * $Id: hio.c,v 1.29 2000/01/26 05:55:56 momjian Exp $
+ * $Id: hio.c,v 1.30 2000/03/17 02:36:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
{
Page pageHeader;
OffsetNumber offnum;
- unsigned int len;
+ Size len;
ItemId itemId;
Item item;
IncrHeapAccessStat(global_RelationPutHeapTuple);
pageHeader = (Page) BufferGetPage(buffer);
- len = (unsigned) MAXALIGN(tuple->t_len); /* be conservative */
- Assert((int) len <= PageGetFreeSpace(pageHeader));
+ len = MAXALIGN(tuple->t_len); /* be conservative */
+ Assert(len <= PageGetFreeSpace(pageHeader));
offnum = PageAddItem((Page) pageHeader, (Item) tuple->t_data,
tuple->t_len, InvalidOffsetNumber, LP_USED);
Page pageHeader;
BlockNumber lastblock;
OffsetNumber offnum;
- unsigned int len;
+ Size len;
ItemId itemId;
Item item;
- len = (unsigned) MAXALIGN(tuple->t_len); /* be conservative */
+ len = MAXALIGN(tuple->t_len); /* be conservative */
/*
* If we're gonna fail for oversize tuple, do it right away...
* this code should go away eventually.
*/
if (len > MaxTupleSize)
- elog(ERROR, "Tuple is too big: size %d, max size %ld",
+ elog(ERROR, "Tuple is too big: size %u, max size %ld",
len, MaxTupleSize);
/*
* test at the top of the routine, and the whole deal should
* go away when we implement tuple splitting anyway...
*/
- elog(ERROR, "Tuple is too big: size %d", len);
+ elog(ERROR, "Tuple is too big: size %u", len);
}
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.55 2000/02/18 06:32:33 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.56 2000/03/17 02:36:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
BlockNumber itup_blkno;
OffsetNumber itup_off;
OffsetNumber firstright = InvalidOffsetNumber;
- int itemsz;
+ Size itemsz;
bool do_split = false;
bool keys_equal = false;
* Note that at this point, itemsz doesn't include the ItemId.
*/
if (itemsz > (PageGetPageSize(page)-sizeof(PageHeaderData)-MAXALIGN(sizeof(BTPageOpaqueData)))/3 - sizeof(ItemIdData))
- elog(ERROR, "btree: index item size %d exceeds maximum %ld",
+ elog(ERROR, "btree: index item size %u exceeds maximum %lu",
itemsz,
(PageGetPageSize(page)-sizeof(PageHeaderData)-MAXALIGN(sizeof(BTPageOpaqueData)))/3 - sizeof(ItemIdData));
tupDes = RelationGetDescr(rel);
- for (i = 1; i <= keysz; i++)
+ for (i = 1; i <= (int) keysz; i++)
{
ScanKey entry = &scankey[i - 1];
Datum attrDatum1,
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.57 2000/02/18 06:32:39 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.58 2000/03/17 02:36:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
tupDes = RelationGetDescr(rel);
- for (i = 1; i <= keysz; i++)
+ for (i = 1; i <= (int) keysz; i++)
{
ScanKey entry = &scankey[i - 1];
Datum attrDatum;
}
} while (keysok >= so->numberOfFirstKeys ||
- (keysok == -1 && ScanDirectionIsBackward(dir)));
+ (keysok == ((Size) -1) && ScanDirectionIsBackward(dir)));
ItemPointerSetInvalid(current);
so->btso_curbuf = InvalidBuffer;
so->btso_curbuf = buf;
return _bt_next(scan, dir);
}
- else if (keysok == -1 && ScanDirectionIsBackward(dir))
+ else if (keysok == ((Size) -1) && ScanDirectionIsBackward(dir))
{
so->btso_curbuf = buf;
return _bt_next(scan, dir);
so->btso_curbuf = buf;
return _bt_next(scan, dir);
}
- else if (keysok == -1 && ScanDirectionIsBackward(dir))
+ else if (keysok == ((Size) -1) && ScanDirectionIsBackward(dir))
{
so->btso_curbuf = buf;
return _bt_next(scan, dir);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.61 2000/02/18 09:30:20 inoue Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.62 2000/03/17 02:36:05 tgl Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
TransactionStateData CurrentTransactionStateData = {
0, /* transaction id */
FirstCommandId, /* command id */
+ 0, /* scan command id */
0x0, /* start time */
TRANS_DEFAULT, /* transaction state */
TBLOCK_DEFAULT /* transaction block state */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.123 2000/03/14 23:06:06 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.124 2000/03/17 02:36:05 tgl Exp $
*
*
* INTERFACE ROUTINES
bool istemp,
bool storage_create)
{
- unsigned i;
+ int i;
Oid relid;
Relation rel;
int len;
static void
CheckAttributeNames(TupleDesc tupdesc)
{
- unsigned i;
- unsigned j;
+ int i;
+ int j;
int natts = tupdesc->natts;
/* ----------------
* an unknown typid (usually as a result of a 'retrieve into'
* - jolly
*/
- for (i = 0; i < natts; i += 1)
+ for (i = 0; i < natts; i++)
{
- for (j = 0; j < sizeof HeapAtt / sizeof HeapAtt[0]; j += 1)
+ for (j = 0; j < (int) (sizeof(HeapAtt) / sizeof(HeapAtt[0])); j++)
{
if (nameeq(&(HeapAtt[j]->attname),
&(tupdesc->attrs[i]->attname)))
* next check for repeated attribute names
* ----------------
*/
- for (i = 1; i < natts; i += 1)
+ for (i = 1; i < natts; i++)
{
- for (j = 0; j < i; j += 1)
+ for (j = 0; j < i; j++)
{
if (nameeq(&(tupdesc->attrs[j]->attname),
&(tupdesc->attrs[i]->attname)))
TupleDesc tupdesc)
{
Form_pg_attribute *dpp;
- unsigned i;
+ int i;
HeapTuple tup;
Relation rel;
bool hasindex;
*------------------------------------------------------------------
*/
-void CommentRelation(int reltype, char *relname, char *comment) {
+static void CommentRelation(int reltype, char *relname, char *comment) {
HeapTuple reltuple;
Oid oid;
*------------------------------------------------------------------
*/
-void CommentAttribute(char *relname, char *attrname, char *comment) {
+static void CommentAttribute(char *relname, char *attrname, char *comment) {
Relation relation;
HeapTuple attrtuple;
*------------------------------------------------------------------
*/
-void CommentDatabase(char *database, char *comment) {
+static void CommentDatabase(char *database, char *comment) {
Relation pg_database;
HeapTuple dbtuple, usertuple;
*------------------------------------------------------------------
*/
-void CommentRewrite(char *rule, char *comment) {
+static void CommentRewrite(char *rule, char *comment) {
HeapTuple rewritetuple;
Oid oid;
*------------------------------------------------------------------
*/
-void CommentType(char *type, char *comment) {
+static void CommentType(char *type, char *comment) {
HeapTuple typetuple;
Oid oid;
*------------------------------------------------------------------
*/
-void CommentAggregate(char *aggregate, char *argument, char *comment) {
+static void CommentAggregate(char *aggregate, char *argument, char *comment) {
HeapTuple aggtuple;
Oid baseoid, oid;
*------------------------------------------------------------------
*/
-void CommentProc(char *function, List *arguments, char *comment)
+static void CommentProc(char *function, List *arguments, char *comment)
{
HeapTuple argtuple, functuple;
Oid oid, argoids[FUNC_MAX_ARGS];
*------------------------------------------------------------------
*/
-void CommentOperator(char *opername, List *arguments, char *comment) {
+static void CommentOperator(char *opername, List *arguments, char *comment) {
Form_pg_operator data;
HeapTuple optuple;
*------------------------------------------------------------------
*/
-void CommentTrigger(char *trigger, char *relname, char *comment) {
+static void CommentTrigger(char *trigger, char *relname, char *comment) {
Form_pg_trigger data;
Relation pg_trigger, relation;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.143 2000/03/09 05:00:23 inoue Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.144 2000/03/17 02:36:06 tgl Exp $
*
*-------------------------------------------------------------------------
*/
vc_scanheap(VRelStats *vacrelstats, Relation onerel,
VPageList vacuum_pages, VPageList fraged_pages)
{
- int nblocks,
+ BlockNumber nblocks,
blkno;
ItemId itemid;
Buffer buf;
last_vacuum_block = -1;
}
if (num_fraged_pages > 0 &&
- blkno ==
- fraged_pages->vpl_pagedesc[num_fraged_pages - 1]->vpd_blkno)
+ fraged_pages->vpl_pagedesc[num_fraged_pages - 1]->vpd_blkno ==
+ (BlockNumber) blkno)
{
/* page is in fraged_pages too; remove it */
--num_fraged_pages;
checked_moved = 0;
for (i = 0, vpp = vacuum_pages->vpl_pagedesc; i < vacuumed_pages; i++, vpp++)
{
- Assert((*vpp)->vpd_blkno < blkno);
+ Assert((*vpp)->vpd_blkno < (BlockNumber) blkno);
buf = ReadBuffer(onerel, (*vpp)->vpd_blkno);
page = BufferGetPage(buf);
if ((*vpp)->vpd_offsets_used == 0) /* this page was not used */
}
/* clean moved tuples from last page in Nvpl list */
- if (vpc->vpd_blkno == blkno - 1 && vpc->vpd_offsets_free > 0)
+ if (vpc->vpd_blkno == (BlockNumber) (blkno - 1) &&
+ vpc->vpd_offsets_free > 0)
{
buf = ReadBuffer(onerel, vpc->vpd_blkno);
page = BufferGetPage(buf);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.30 2000/01/26 05:56:28 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.31 2000/03/17 02:36:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
{
if (args[i].len == VAR_LENGTH_ARG)
arg[i] = (char *) args[i].u.ptr;
- else if (args[i].len > sizeof(int4))
+ else if ((Size) args[i].len > sizeof(int4))
elog(ERROR, "arg_length of argument %d too long", i);
else
arg[i] = (char *) args[i].u.integer;
* wherein you authenticate a user by seeing what IP address the system
* says he comes from and possibly using ident).
*
- * $Id: hba.c,v 1.49 1999/10/23 03:13:21 tgl Exp $
+ * $Id: hba.c,v 1.50 2000/03/17 02:36:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
cursor++; /* skip blanks */
i = 0;
while (*cursor != ':' && *cursor != '\r' && !isblank(*cursor)
- && i < sizeof(response_type) - 1)
+ && i < (int) (sizeof(response_type) - 1))
response_type[i++] = *cursor++;
response_type[i] = '\0';
while (isblank(*cursor))
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: portal.c,v 1.29 2000/01/26 05:56:29 momjian Exp $
+ * $Id: portal.c,v 1.30 2000/03/17 02:36:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
int i,
n = 0;
- for (i = 0; i < portals_array_size; ++i)
+ for (i = 0; i < (int) portals_array_size; ++i)
{
if (portals[i] && portals[i]->portal)
{
if (!valid_pointer("PQpnames: invalid name buffer", pnames))
return;
- for (i = 0; i < portals_array_size; ++i)
+ for (i = 0; i < (int) portals_array_size; ++i)
{
if (portals[i] && portals[i]->portal)
{
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portalbuf.c,v 1.22 2000/01/26 05:56:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portalbuf.c,v 1.23 2000/03/17 02:36:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
libpq_raise(&PortalError,
vararg_format("Cannot alloc more memory in portals_realloc"));
- for (i = oldsize; i < portals_array_size; i++)
+ for (i = oldsize; i < (int) portals_array_size; i++)
portals[i] = (PortalEntry *) NULL;
}
if (portals)
{
- for (i = 0; i < portals_array_size; i++)
+ for (i = 0; i < (int) portals_array_size; i++)
if (portals[i] != NULL &&
strncmp(portals[i]->name, pname, PortalNameLength) == 0)
return i;
pbuf_freePortal(portals[i]->portal);
else
{
- for (i = 0; i < portals_array_size; i++)
+ for (i = 0; i < (int) portals_array_size; i++)
if (portals[i] == NULL)
break;
/* If the portal table is full, enlarge it */
- if (i >= portals_array_size)
+ if (i >= (int) portals_array_size)
portals_realloc(PORTALS_GROW_BY);
portals[i] = pbuf_addEntry();
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.110 2000/02/21 18:47:00 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.111 2000/03/17 02:36:12 tgl Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
{
s = (char *) (&value);
appendStringInfo(str, " %d [ ", length);
- for (i = 0; i < sizeof(Datum); i++)
+ for (i = 0; i < (int) sizeof(Datum); i++)
appendStringInfo(str, "%d ", (int) (s[i]));
appendStringInfo(str, "] ");
}
if (((int) length) <= -1)
length = VARSIZE(s);
appendStringInfo(str, " %d [ ", length);
- for (i = 0; i < length; i++)
+ for (i = 0; i < (int) length; i++)
appendStringInfo(str, "%d ", (int) (s[i]));
appendStringInfo(str, "] ");
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.85 2000/02/20 21:32:05 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.86 2000/03/17 02:36:12 tgl Exp $
*
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
if (byValue)
{
- if (length > sizeof(Datum))
+ if ((Size) length > sizeof(Datum))
elog(ERROR, "readValue: byval & length = %d", length);
res = (Datum) 0;
s = (char *) (&res);
- for (i = 0; i < sizeof(Datum); i++)
+ for (i = 0; i < (int) sizeof(Datum); i++)
{
token = lsptok(NULL, &tokenLength);
s[i] = (char) atoi(token);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.30 2000/01/26 05:56:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.31 2000/03/17 02:36:14 tgl Exp $
*
*-------------------------------------------------------------------------
*/
*/
Index varno = ((Var *) clause)->varno;
- if (varRelid == 0 || varRelid == varno)
+ if (varRelid == 0 || varRelid == (int) varno)
s1 = restriction_selectivity(F_EQSEL,
BooleanEqualOperator,
getrelid(varno, root->rtable),
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.31 2000/03/14 02:23:15 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.32 2000/03/17 02:36:15 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#include "utils/lsyscache.h"
-int PlannerQueryLevel; /* level of current query */
+Index PlannerQueryLevel; /* level of current query */
List *PlannerInitPlan; /* init subplans for current query */
List *PlannerParamVar; /* to get Var from Param->paramid */
int PlannerPlanId; /* to assign unique ID to subquery plans */
* is set from the absolute level value given by varlevel.
*/
static int
-new_param(Var *var, int varlevel)
+new_param(Var *var, Index varlevel)
{
Var *paramVar = (Var *) copyObject(var);
{
List *ppv;
Param *retval;
- int varlevel;
+ Index varlevel;
int i;
Assert(var->varlevelsup > 0 && var->varlevelsup < PlannerQueryLevel);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_agg.c,v 1.35 2000/03/14 23:06:32 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_agg.c,v 1.36 2000/03/17 02:36:17 tgl Exp $
*
*-------------------------------------------------------------------------
*/
return false; /* outer-level Var is acceptable */
/* Found an ungrouped local variable; generate error message */
Assert(var->varno > 0 &&
- var->varno <= length(context->pstate->p_rtable));
+ (int) var->varno <= length(context->pstate->p_rtable));
rte = rt_fetch(var->varno, context->pstate->p_rtable);
attname = get_attname(rte->relid, var->varattno);
if (! attname)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.37 2000/03/14 23:06:33 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.38 2000/03/17 02:36:17 tgl Exp $
*
*-------------------------------------------------------------------------
*/
},
};
-#define SPECIALS (sizeof(special_attr)/sizeof(*special_attr))
+#define SPECIALS ((int) (sizeof(special_attr)/sizeof(*special_attr)))
static char *attnum_type[SPECIALS] = {
"tid",
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.136 2000/02/18 09:28:44 inoue Exp $
+ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.137 2000/03/17 02:36:18 tgl Exp $
*
* NOTES
*
/*
* ConnFree -- cree a local connection data structure
*/
-void
+static void
ConnFree(Port *conn)
{
#ifdef USE_SSL
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.53 2000/02/28 08:51:43 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.54 2000/03/17 02:36:19 tgl Exp $
*
* NOTES:
*
#define VFD_CLOSED (-1)
#define FileIsValid(file) \
- ((file) > 0 && (file) < SizeVfdCache && VfdCache[file].fileName != NULL)
+ ((file) > 0 && (file) < (int) SizeVfdCache && VfdCache[file].fileName != NULL)
#define FileIsNotOpen(file) (VfdCache[file].fd == VFD_CLOSED)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.28 2000/01/26 05:56:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.29 2000/03/17 02:36:21 tgl Exp $
*
*-------------------------------------------------------------------------
*/
int
SIBackendInit(SISeg *segP)
{
- Index index;
- ProcState *stateP = NULL;
+ int index;
+ ProcState *stateP = NULL;
Assert(MyBackendTag > 0);
* out of its tuple
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.46 2000/03/15 23:42:14 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.47 2000/03/17 02:36:23 tgl Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
*/
if (strcmp(proname, "bpchar") == 0)
{
- if (coercedTypmod > VARHDRSZ)
+ if (coercedTypmod > (int32) VARHDRSZ)
appendStringInfo(buf, "char(%d)", coercedTypmod - VARHDRSZ);
else
appendStringInfo(buf, "char");
}
else if (strcmp(proname, "varchar") == 0)
{
- if (coercedTypmod > VARHDRSZ)
+ if (coercedTypmod > (int32) VARHDRSZ)
appendStringInfo(buf, "varchar(%d)", coercedTypmod - VARHDRSZ);
else
appendStringInfo(buf, "varchar");
}
else if (strcmp(proname, "numeric") == 0)
{
- if (coercedTypmod >= VARHDRSZ)
+ if (coercedTypmod >= (int32) VARHDRSZ)
appendStringInfo(buf, "numeric(%d,%d)",
((coercedTypmod - VARHDRSZ) >> 16) & 0xffff,
(coercedTypmod - VARHDRSZ) & 0xffff);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.92 2000/03/09 05:00:25 inoue Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.93 2000/03/17 02:36:27 tgl Exp $
*
*-------------------------------------------------------------------------
*/
{
Relation relation;
Size len;
- int i;
+ u_int i;
/* ----------------
* allocate new relation desc
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.29 2000/02/26 05:25:54 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.30 2000/03/17 02:36:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
long *
hash_seq(HTAB *hashp)
{
- static uint32 curBucket = 0;
+ static long curBucket = 0;
static BUCKET_INDEX curIndex;
ELEMENT *curElem;
long segment_num;
{
chain = GET_BUCKET(hashp, chainIndex);
nextIndex = chain->next;
- if (call_hash(hashp, (char *) &(chain->key)) == old_bucket)
+ if ((long) call_hash(hashp, (char *) &(chain->key)) == old_bucket)
{
*old = chainIndex;
old = &chain->next;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/hash/hashfn.c,v 1.11 2000/01/26 05:57:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/hash/hashfn.c,v 1.12 2000/03/17 02:36:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
break;
default:
- for (; keysize > (sizeof(int) - 1); keysize -= sizeof(int), key++)
+ for (; keysize >= (int) sizeof(int); keysize -= sizeof(int), key++)
h = h * PRIME1 ^ (*key);
/*
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.34 2000/01/31 04:35:53 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.35 2000/03/17 02:36:29 tgl Exp $
*
*-------------------------------------------------------------------------
*/
} while(0)
#define PortalHashTableDelete(PORTAL) \
-{ \
+do { \
PortalHashEnt *hentry; bool found; char key[MAX_PORTALNAME_LEN]; \
\
MemSet(key, 0, MAX_PORTALNAME_LEN); \
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/sort/logtape.c,v 1.3 2000/01/26 05:57:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/sort/logtape.c,v 1.4 2000/03/17 02:36:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
* Block indexes are "long"s, so we can fit this many per indirect block.
* NB: we assume this is an exact fit!
*/
-#define BLOCKS_PER_INDIR_BLOCK (BLCKSZ / sizeof(long))
+#define BLOCKS_PER_INDIR_BLOCK ((int) (BLCKSZ / sizeof(long)))
/*
* We use a struct like this for each active indirection level of each
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/sort/tuplesort.c,v 1.7 2000/03/01 17:14:09 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/sort/tuplesort.c,v 1.8 2000/03/17 02:36:31 tgl Exp $
*
*-------------------------------------------------------------------------
*/
IndexTuple tuple1 = (IndexTuple) a;
IndexTuple tuple2 = (IndexTuple) b;
Relation rel = state->indexRel;
- Size keysz = RelationGetNumberOfAttributes(rel);
+ int keysz = RelationGetNumberOfAttributes(rel);
ScanKey scankey = state->indexScanKey;
TupleDesc tupDes;
int i;
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: itup.h,v 1.23 2000/01/26 05:57:50 momjian Exp $
+ * $Id: itup.h,v 1.24 2000/03/17 02:36:37 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#define INDEX_NULL_MASK 0x8000
#define INDEX_VAR_MASK 0x4000
-#define IndexTupleSize(itup) (((IndexTuple) (itup))->t_info & 0x1FFF)
-#define IndexTupleDSize(itup) ((itup).t_info & 0x1FFF)
+#define IndexTupleSize(itup) ((Size) (((IndexTuple) (itup))->t_info & 0x1FFF))
+#define IndexTupleDSize(itup) ((Size) ((itup).t_info & 0x1FFF))
#define IndexTupleNoNulls(itup) (!(((IndexTuple) (itup))->t_info & 0x8000))
#define IndexTupleAllFixed(itup) (!(((IndexTuple) (itup))->t_info & 0x4000))
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: tupmacs.h,v 1.13 2000/01/26 05:57:51 momjian Exp $
+ * $Id: tupmacs.h,v 1.14 2000/03/17 02:36:37 tgl Exp $
*
*-------------------------------------------------------------------------
*/
( \
(*(A))->attbyval && (*(A))->attlen != -1 ? \
( \
- (*(A))->attlen > sizeof(int16) ? \
+ (*(A))->attlen > (int) sizeof(int16) ? \
( \
(char *) (long) *((int32 *)(T)) \
) \
: \
( \
- (*(A))->attlen < sizeof(int16) ? \
+ (*(A))->attlen < (int) sizeof(int16) ? \
(char *) (long) *((char *)(T)) \
: \
(char *) (long) *((int16 *)(T))) \
#include "nodes/plannodes.h"
-extern int PlannerQueryLevel; /* level of current query */
+extern Index PlannerQueryLevel; /* level of current query */
extern List *PlannerInitPlan; /* init subplans for current query */
extern List *PlannerParamVar; /* to get Var from Param->paramid */
extern int PlannerPlanId; /* to assign unique ID to subquery plans */
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1995, Regents of the University of California
*
- * $Id: postgres.h,v 1.36 2000/01/26 05:57:46 momjian Exp $
+ * $Id: postgres.h,v 1.37 2000/03/17 02:36:34 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#define VARSIZE(PTR) (((struct varlena *)(PTR))->vl_len)
#define VARDATA(PTR) (((struct varlena *)(PTR))->vl_dat)
-#define VARHDRSZ sizeof(int32)
+#define VARHDRSZ ((int32) sizeof(int32))
typedef struct varlena bytea;
typedef struct varlena text;
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: block.h,v 1.10 2000/01/26 05:58:32 momjian Exp $
+ * $Id: block.h,v 1.11 2000/03/17 02:36:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
* True iff blockNumber is valid.
*/
#define BlockNumberIsValid(blockNumber) \
- ((bool) ((int32) (blockNumber) != InvalidBlockNumber))
+ ((bool) ((BlockNumber) (blockNumber) != InvalidBlockNumber))
/*
* BlockIdIsValid