Commit 52f77df6 authored by Bruce Momjian's avatar Bruce Momjian

Ye-old pgindent run. Same 4-space tabs.

parent db451872
...@@ -34,6 +34,7 @@ int32 array_all_int4le(ArrayType *array, int4 value); ...@@ -34,6 +34,7 @@ int32 array_all_int4le(ArrayType *array, int4 value);
int32 array_oideq(ArrayType *array, Oid value); int32 array_oideq(ArrayType *array, Oid value);
int32 array_all_oidne(ArrayType *array, Oid value); int32 array_all_oidne(ArrayType *array, Oid value);
#endif #endif
/* /*
......
This diff is collapsed.
...@@ -52,22 +52,22 @@ struct varbita ...@@ -52,22 +52,22 @@ struct varbita
#define BITHIGH 0x80 #define BITHIGH 0x80
bits8 * zpbitin(char *s, int dummy, int32 atttypmod); bits8 *zpbitin(char *s, int dummy, int32 atttypmod);
char * zpbitout(bits8 *s); char *zpbitout(bits8 *s);
char * zpbitsout(bits8 *s); char *zpbitsout(bits8 *s);
bits8 * varbitin(char *s, int dummy, int32 atttypmod); bits8 *varbitin(char *s, int dummy, int32 atttypmod);
bool biteq (bits8 *arg1, bits8 *arg2); bool biteq(bits8 *arg1, bits8 *arg2);
bool bitne (bits8 *arg1, bits8 *arg2); bool bitne(bits8 *arg1, bits8 *arg2);
bool bitge (bits8 *arg1, bits8 *arg2); bool bitge(bits8 *arg1, bits8 *arg2);
bool bitgt (bits8 *arg1, bits8 *arg2); bool bitgt(bits8 *arg1, bits8 *arg2);
bool bitle (bits8 *arg1, bits8 *arg2); bool bitle(bits8 *arg1, bits8 *arg2);
bool bitlt (bits8 *arg1, bits8 *arg2); bool bitlt(bits8 *arg1, bits8 *arg2);
int bitcmp (bits8 *arg1, bits8 *arg2); int bitcmp(bits8 *arg1, bits8 *arg2);
bits8 * bitand (bits8 * arg1, bits8 * arg2); bits8 *bitand(bits8 *arg1, bits8 *arg2);
bits8 * bitor (bits8 * arg1, bits8 * arg2); bits8 *bitor(bits8 *arg1, bits8 *arg2);
bits8 * bitxor (bits8 * arg1, bits8 * arg2); bits8 *bitxor(bits8 *arg1, bits8 *arg2);
bits8 * bitnot (bits8 * arg); bits8 *bitnot(bits8 *arg);
bits8 * bitshiftright (bits8 * arg, int shft); bits8 *bitshiftright(bits8 *arg, int shft);
bits8 * bitshiftleft (bits8 * arg, int shft); bits8 *bitshiftleft(bits8 *arg, int shft);
bits8 * bitcat (bits8 *arg1, bits8 *arg2); bits8 *bitcat(bits8 *arg1, bits8 *arg2);
bits8 * bitsubstr (bits8 *arg, int32 s, int32 l); bits8 *bitsubstr(bits8 *arg, int32 s, int32 l);
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
#include "varbit.h" #include "varbit.h"
bits8 * varbit_in (char * s); bits8 *varbit_in(char *s);
char * varbit_out (bits8 *s); char *varbit_out(bits8 *s);
bits8 * bits8 *
varbit_in (char * s) { varbit_in(char *s)
return varbitin (s, 0, -1); {
return varbitin(s, 0, -1);
} }
/*char * /*char *
...@@ -17,6 +18,7 @@ varbit_out (bits8 *s) { ...@@ -17,6 +18,7 @@ varbit_out (bits8 *s) {
*/ */
char * char *
varbit_out (bits8 *s) { varbit_out(bits8 *s)
{
return zpbitsout(s); return zpbitsout(s);
} }
This diff is collapsed.
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
* Decode time string 00:00:00 through 24:00:00. * Decode time string 00:00:00 through 24:00:00.
*/ */
static int static int
decode_24h_time(char *str, struct tm *tm, double *fsec) decode_24h_time(char *str, struct tm * tm, double *fsec)
{ {
char *cp; char *cp;
...@@ -51,9 +51,7 @@ decode_24h_time(char *str, struct tm *tm, double *fsec) ...@@ -51,9 +51,7 @@ decode_24h_time(char *str, struct tm *tm, double *fsec)
*fsec = 0; *fsec = 0;
} }
else if (*cp != ':') else if (*cp != ':')
{
return -1; return -1;
}
else else
{ {
str = cp + 1; str = cp + 1;
...@@ -72,10 +70,10 @@ decode_24h_time(char *str, struct tm *tm, double *fsec) ...@@ -72,10 +70,10 @@ decode_24h_time(char *str, struct tm *tm, double *fsec)
} }
/* do a sanity check */ /* do a sanity check */
if ( (tm->tm_hour < 0) || (tm->tm_hour > 24) if ((tm->tm_hour < 0) || (tm->tm_hour > 24)
|| (tm->tm_min < 0) || (tm->tm_min > 59) || (tm->tm_min < 0) || (tm->tm_min > 59)
|| (tm->tm_sec < 0) || (tm->tm_sec > 59) || (tm->tm_sec < 0) || (tm->tm_sec > 59)
|| (*fsec < 0) ) || (*fsec < 0))
return -1; return -1;
return 0; return 0;
......
...@@ -38,6 +38,7 @@ extern int assertTest(int val); ...@@ -38,6 +38,7 @@ extern int assertTest(int val);
#ifdef ASSERT_CHECKING_TEST #ifdef ASSERT_CHECKING_TEST
extern int assertEnable(int val); extern int assertEnable(int val);
#endif #endif
int int
...@@ -84,7 +85,8 @@ active_listeners(text *relname) ...@@ -84,7 +85,8 @@ active_listeners(text *relname)
ScanKeyData key; ScanKeyData key;
Datum d; Datum d;
bool isnull; bool isnull;
int len, pid; int len,
pid;
int count = 0; int count = 0;
int ourpid = getpid(); int ourpid = getpid();
char listen_name[NAMEDATALEN]; char listen_name[NAMEDATALEN];
...@@ -92,8 +94,9 @@ active_listeners(text *relname) ...@@ -92,8 +94,9 @@ active_listeners(text *relname)
lRel = heap_openr(ListenerRelationName, AccessShareLock); lRel = heap_openr(ListenerRelationName, AccessShareLock);
tdesc = RelationGetDescr(lRel); tdesc = RelationGetDescr(lRel);
if (relname && (VARSIZE(relname) > VARHDRSZ)) { if (relname && (VARSIZE(relname) > VARHDRSZ))
len = MIN(VARSIZE(relname)-VARHDRSZ, NAMEDATALEN-1); {
len = MIN(VARSIZE(relname) - VARHDRSZ, NAMEDATALEN - 1);
strncpy(listen_name, VARDATA(relname), len); strncpy(listen_name, VARDATA(relname), len);
listen_name[len] = '\0'; listen_name[len] = '\0';
ScanKeyEntryInitialize(&key, 0, ScanKeyEntryInitialize(&key, 0,
...@@ -101,15 +104,16 @@ active_listeners(text *relname) ...@@ -101,15 +104,16 @@ active_listeners(text *relname)
F_NAMEEQ, F_NAMEEQ,
PointerGetDatum(listen_name)); PointerGetDatum(listen_name));
sRel = heap_beginscan(lRel, 0, SnapshotNow, 1, &key); sRel = heap_beginscan(lRel, 0, SnapshotNow, 1, &key);
} else {
sRel = heap_beginscan(lRel, 0, SnapshotNow, 0, (ScanKey)NULL);
} }
else
sRel = heap_beginscan(lRel, 0, SnapshotNow, 0, (ScanKey) NULL);
while (HeapTupleIsValid(lTuple = heap_getnext(sRel, 0))) while (HeapTupleIsValid(lTuple = heap_getnext(sRel, 0)))
{ {
d = heap_getattr(lTuple, Anum_pg_listener_pid, tdesc, &isnull); d = heap_getattr(lTuple, Anum_pg_listener_pid, tdesc, &isnull);
pid = DatumGetInt32(d); pid = DatumGetInt32(d);
if ((pid == ourpid) || (kill(pid, SIGTSTP) == 0)) { if ((pid == ourpid) || (kill(pid, SIGTSTP) == 0))
{
/* elog(NOTICE, "%d ok", pid); */ /* elog(NOTICE, "%d ok", pid); */
count++; count++;
} }
...@@ -134,6 +138,7 @@ assert_test(int val) ...@@ -134,6 +138,7 @@ assert_test(int val)
{ {
return assertTest(val); return assertTest(val);
} }
#endif #endif
#endif #endif
......
...@@ -10,8 +10,10 @@ int active_listeners(text *relname); ...@@ -10,8 +10,10 @@ int active_listeners(text *relname);
#ifdef USE_ASSERT_CHECKING #ifdef USE_ASSERT_CHECKING
int assert_enable(int val); int assert_enable(int val);
#ifdef ASSERT_CHECKING_TEST #ifdef ASSERT_CHECKING_TEST
int assert_test(int val); int assert_test(int val);
#endif #endif
#endif #endif
......
This diff is collapsed.
...@@ -89,9 +89,8 @@ string_output(unsigned char *data, int size) ...@@ -89,9 +89,8 @@ string_output(unsigned char *data, int size)
break; break;
case '{': case '{':
/* Escape beginning of string, to distinguish from arrays */ /* Escape beginning of string, to distinguish from arrays */
if (p == data) { if (p == data)
len++; len++;
}
break; break;
default: default:
if (NOTPRINTABLE(*p)) if (NOTPRINTABLE(*p))
...@@ -137,9 +136,8 @@ string_output(unsigned char *data, int size) ...@@ -137,9 +136,8 @@ string_output(unsigned char *data, int size)
break; break;
case '{': case '{':
/* Escape beginning of string, to distinguish from arrays */ /* Escape beginning of string, to distinguish from arrays */
if (p == data) { if (p == data)
*r++ = '\\'; *r++ = '\\';
}
*r++ = c; *r++ = c;
break; break;
default: default:
...@@ -361,6 +359,7 @@ c_charin(unsigned char *str) ...@@ -361,6 +359,7 @@ c_charin(unsigned char *str)
{ {
return (string_input(str, 1, 0, NULL)); return (string_input(str, 1, 0, NULL));
} }
#endif #endif
/* end of file */ /* end of file */
......
#ifndef STRING_IO_H #ifndef STRING_IO_H
#define STRING_IO_H #define STRING_IO_H
unsigned char* string_output(unsigned char *data, int size); unsigned char *string_output(unsigned char *data, int size);
unsigned char* string_input(unsigned char *str, int size, int hdrsize, unsigned char *string_input(unsigned char *str, int size, int hdrsize,
int *rtn_size); int *rtn_size);
unsigned char* c_charout(int32 c); unsigned char *c_charout(int32 c);
unsigned char* c_textout(struct varlena * vlena); unsigned char *c_textout(struct varlena * vlena);
unsigned char* c_varcharout(unsigned char *s); unsigned char *c_varcharout(unsigned char *s);
#if 0 #if 0
struct varlena* c_textin(unsigned char *str); struct varlena *c_textin(unsigned char *str);
int32* c_charin(unsigned char *str) int32 *
c_charin(unsigned char *str)
#endif #endif
#endif #endif
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.61 2000/01/26 05:55:53 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.62 2000/04/12 17:14:36 momjian Exp $
* *
* NOTES * NOTES
* The old interface functions have been converted to macros * The old interface functions have been converted to macros
...@@ -139,7 +139,7 @@ DataFill(char *data, ...@@ -139,7 +139,7 @@ DataFill(char *data,
default: default:
Assert(att[i]->attlen >= 0); Assert(att[i]->attlen >= 0);
memmove(data, DatumGetPointer(value[i]), memmove(data, DatumGetPointer(value[i]),
(size_t)(att[i]->attlen)); (size_t) (att[i]->attlen));
break; break;
} }
data = (char *) att_addlength((long) data, att[i]->attlen, value[i]); data = (char *) att_addlength((long) data, att[i]->attlen, value[i]);
...@@ -326,7 +326,7 @@ nocachegetattr(HeapTuple tuple, ...@@ -326,7 +326,7 @@ nocachegetattr(HeapTuple tuple,
Form_pg_attribute *att = tupleDesc->attrs; Form_pg_attribute *att = tupleDesc->attrs;
int slow = 0; /* do we have to walk nulls? */ int slow = 0; /* do we have to walk nulls? */
(void)isnull; /*not used*/ (void) isnull; /* not used */
#ifdef IN_MACRO #ifdef IN_MACRO
/* This is handled in the macro */ /* This is handled in the macro */
Assert(attnum > 0); Assert(attnum > 0);
...@@ -806,11 +806,9 @@ void ...@@ -806,11 +806,9 @@ void
heap_freetuple(HeapTuple htup) heap_freetuple(HeapTuple htup)
{ {
if (htup->t_data != NULL) if (htup->t_data != NULL)
if (htup->t_datamcxt != NULL && (char *)(htup->t_data) != if (htup->t_datamcxt != NULL && (char *) (htup->t_data) !=
((char *) htup + HEAPTUPLESIZE)) ((char *) htup + HEAPTUPLESIZE))
{
elog(NOTICE, "TELL Jan Wieck: heap_freetuple() found separate t_data"); elog(NOTICE, "TELL Jan Wieck: heap_freetuple() found separate t_data");
}
pfree(htup); pfree(htup);
} }
...@@ -851,7 +849,7 @@ heap_addheader(uint32 natts, /* max domain index */ ...@@ -851,7 +849,7 @@ heap_addheader(uint32 natts, /* max domain index */
td->t_infomask |= HEAP_XMAX_INVALID; td->t_infomask |= HEAP_XMAX_INVALID;
if (structlen > 0) if (structlen > 0)
memmove((char *) td + hoff, structure, (size_t)structlen); memmove((char *) td + hoff, structure, (size_t) structlen);
return tuple; return tuple;
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.42 2000/01/26 05:55:53 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.43 2000/04/12 17:14:37 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -134,7 +134,7 @@ nocache_index_getattr(IndexTuple tup, ...@@ -134,7 +134,7 @@ nocache_index_getattr(IndexTuple tup,
int data_off; /* tuple data offset */ int data_off; /* tuple data offset */
Form_pg_attribute *att = tupleDesc->attrs; Form_pg_attribute *att = tupleDesc->attrs;
(void)isnull; (void) isnull;
/* ---------------- /* ----------------
* sanity checks * sanity checks
* ---------------- * ----------------
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.61 2000/01/31 04:35:48 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.62 2000/04/12 17:14:37 momjian Exp $
* *
* NOTES * NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be * some of the executor utility code such as "ExecTypeFromTL" should be
...@@ -238,8 +238,10 @@ equalTupleDescs(TupleDesc tupdesc1, TupleDesc tupdesc2) ...@@ -238,8 +238,10 @@ equalTupleDescs(TupleDesc tupdesc1, TupleDesc tupdesc2)
Form_pg_attribute attr1 = tupdesc1->attrs[i]; Form_pg_attribute attr1 = tupdesc1->attrs[i];
Form_pg_attribute attr2 = tupdesc2->attrs[i]; Form_pg_attribute attr2 = tupdesc2->attrs[i];
/* We do not need to check every single field here, and in fact /*
* some fields such as attdisbursion probably shouldn't be compared. * We do not need to check every single field here, and in fact
* some fields such as attdisbursion probably shouldn't be
* compared.
*/ */
if (strcmp(NameStr(attr1->attname), NameStr(attr2->attname)) != 0) if (strcmp(NameStr(attr1->attname), NameStr(attr2->attname)) != 0)
return false; return false;
...@@ -585,8 +587,9 @@ BuildDescForRelation(List *schema, char *relname) ...@@ -585,8 +587,9 @@ BuildDescForRelation(List *schema, char *relname)
constr->has_not_null = true; constr->has_not_null = true;
desc->attrs[attnum - 1]->attnotnull = entry->is_not_null; desc->attrs[attnum - 1]->attnotnull = entry->is_not_null;
/* Note we copy only pre-cooked default expressions. /*
* Digestion of raw ones is someone else's problem. * Note we copy only pre-cooked default expressions. Digestion of
* raw ones is someone else's problem.
*/ */
if (entry->cooked_default != NULL) if (entry->cooked_default != NULL)
{ {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.52 2000/03/17 02:36:00 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.53 2000/04/12 17:14:39 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -52,8 +52,10 @@ void gistdelete(Relation r, ItemPointer tid); ...@@ -52,8 +52,10 @@ void gistdelete(Relation r, ItemPointer tid);
static IndexTuple gist_tuple_replacekey(Relation r, GISTENTRY entry, IndexTuple t); static IndexTuple gist_tuple_replacekey(Relation r, GISTENTRY entry, IndexTuple t);
static void gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr, static void gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
Relation r, Page pg, OffsetNumber o, int b, bool l); Relation r, Page pg, OffsetNumber o, int b, bool l);
#ifdef GISTDEBUG #ifdef GISTDEBUG
static char *int_range_out(INTRANGE *r); static char *int_range_out(INTRANGE *r);
#endif #endif
/* /*
...@@ -186,7 +188,7 @@ gistbuild(Relation heap, ...@@ -186,7 +188,7 @@ gistbuild(Relation heap,
#ifndef OMIT_PARTIAL_INDEX #ifndef OMIT_PARTIAL_INDEX
/* SetSlotContents(slot, htup); */ /* SetSlotContents(slot, htup); */
slot->val = htup; slot->val = htup;
if (! ExecQual((List *) pred, econtext, false)) if (!ExecQual((List *) pred, econtext, false))
continue; continue;
#endif /* OMIT_PARTIAL_INDEX */ #endif /* OMIT_PARTIAL_INDEX */
} }
...@@ -272,13 +274,13 @@ gistbuild(Relation heap, ...@@ -272,13 +274,13 @@ gistbuild(Relation heap,
/* /*
* Since we just counted the tuples in the heap, we update its stats * Since we just counted the tuples in the heap, we update its stats
* in pg_class to guarantee that the planner takes advantage of the * in pg_class to guarantee that the planner takes advantage of the
* index we just created. But, only update statistics during * index we just created. But, only update statistics during normal
* normal index definitions, not for indices on system catalogs * index definitions, not for indices on system catalogs created
* created during bootstrap processing. We must close the relations * during bootstrap processing. We must close the relations before
* before updating statistics to guarantee that the relcache entries * updating statistics to guarantee that the relcache entries are
* are flushed when we increment the command counter in UpdateStats(). * flushed when we increment the command counter in UpdateStats(). But
* But we do not release any locks on the relations; those will be * we do not release any locks on the relations; those will be held
* held until end of transaction. * until end of transaction.
*/ */
if (IsNormalProcessingMode()) if (IsNormalProcessingMode())
{ {
......
...@@ -266,7 +266,7 @@ gistdropscan(IndexScanDesc s) ...@@ -266,7 +266,7 @@ gistdropscan(IndexScanDesc s)
prev = l; prev = l;
if (l == (GISTScanList) NULL) if (l == (GISTScanList) NULL)
elog(ERROR, "GiST scan list corrupted -- cannot find 0x%p", (void*)s); elog(ERROR, "GiST scan list corrupted -- cannot find 0x%p", (void *) s);
if (prev == (GISTScanList) NULL) if (prev == (GISTScanList) NULL)
GISTScans = l->gsl_next; GISTScans = l->gsl_next;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.36 2000/03/01 05:39:22 inoue Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.37 2000/04/12 17:14:43 momjian Exp $
* *
* NOTES * NOTES
* This file contains only the public interface routines. * This file contains only the public interface routines.
...@@ -149,7 +149,7 @@ hashbuild(Relation heap, ...@@ -149,7 +149,7 @@ hashbuild(Relation heap,
#ifndef OMIT_PARTIAL_INDEX #ifndef OMIT_PARTIAL_INDEX
/* SetSlotContents(slot, htup); */ /* SetSlotContents(slot, htup); */
slot->val = htup; slot->val = htup;
if (! ExecQual((List *) pred, econtext, false)) if (!ExecQual((List *) pred, econtext, false))
continue; continue;
#endif /* OMIT_PARTIAL_INDEX */ #endif /* OMIT_PARTIAL_INDEX */
} }
...@@ -230,13 +230,13 @@ hashbuild(Relation heap, ...@@ -230,13 +230,13 @@ hashbuild(Relation heap,
/* /*
* Since we just counted the tuples in the heap, we update its stats * Since we just counted the tuples in the heap, we update its stats
* in pg_class to guarantee that the planner takes advantage of the * in pg_class to guarantee that the planner takes advantage of the
* index we just created. But, only update statistics during * index we just created. But, only update statistics during normal
* normal index definitions, not for indices on system catalogs * index definitions, not for indices on system catalogs created
* created during bootstrap processing. We must close the relations * during bootstrap processing. We must close the relations before
* before updating statistics to guarantee that the relcache entries * updating statistics to guarantee that the relcache entries are
* are flushed when we increment the command counter in UpdateStats(). * flushed when we increment the command counter in UpdateStats(). But
* But we do not release any locks on the relations; those will be * we do not release any locks on the relations; those will be held
* held until end of transaction. * until end of transaction.
*/ */
if (IsNormalProcessingMode()) if (IsNormalProcessingMode())
{ {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.24 2000/02/21 03:36:46 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.25 2000/04/12 17:14:44 momjian Exp $
* *
* NOTES * NOTES
* These functions are stored in pg_amproc. For each operator class * These functions are stored in pg_amproc. For each operator class
...@@ -146,7 +146,7 @@ hashoidvector(Oid *key) ...@@ -146,7 +146,7 @@ hashoidvector(Oid *key)
int i; int i;
uint32 result = 0; uint32 result = 0;
for (i = INDEX_MAX_KEYS; --i >= 0; ) for (i = INDEX_MAX_KEYS; --i >= 0;)
result = (result << 1) ^ (~(uint32) key[i]); result = (result << 1) ^ (~(uint32) key[i]);
return result; return result;
} }
...@@ -162,7 +162,7 @@ hashint2vector(int16 *key) ...@@ -162,7 +162,7 @@ hashint2vector(int16 *key)
int i; int i;
uint32 result = 0; uint32 result = 0;
for (i = INDEX_MAX_KEYS; --i >= 0; ) for (i = INDEX_MAX_KEYS; --i >= 0;)
result = (result << 1) ^ (~(uint32) key[i]); result = (result << 1) ^ (~(uint32) key[i]);
return result; return result;
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.22 2000/01/26 05:55:55 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.23 2000/04/12 17:14:44 momjian Exp $
* *
* NOTES * NOTES
* Because we can be doing an index scan on a relation while we * Because we can be doing an index scan on a relation while we
...@@ -75,7 +75,7 @@ _hash_dropscan(IndexScanDesc scan) ...@@ -75,7 +75,7 @@ _hash_dropscan(IndexScanDesc scan)
last = chk; last = chk;
if (chk == (HashScanList) NULL) if (chk == (HashScanList) NULL)
elog(ERROR, "hash scan list trashed; can't find 0x%p", (void*)scan); elog(ERROR, "hash scan list trashed; can't find 0x%p", (void *) scan);
if (last == (HashScanList) NULL) if (last == (HashScanList) NULL)
HashScans = chk->hashsl_next; HashScans = chk->hashsl_next;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.23 2000/03/17 02:36:02 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.24 2000/04/12 17:14:44 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.66 2000/02/09 03:49:47 inoue Exp $ * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.67 2000/04/12 17:14:45 momjian Exp $
* *
* *
* INTERFACE ROUTINES * INTERFACE ROUTINES
...@@ -188,8 +188,9 @@ unpinscan(HeapScanDesc scan) ...@@ -188,8 +188,9 @@ unpinscan(HeapScanDesc scan)
if (BufferIsValid(scan->rs_nbuf)) if (BufferIsValid(scan->rs_nbuf))
ReleaseBuffer(scan->rs_nbuf); ReleaseBuffer(scan->rs_nbuf);
/* we don't bother to clear rs_pbuf etc --- caller must /*
* reinitialize them if scan descriptor is not being deleted. * we don't bother to clear rs_pbuf etc --- caller must reinitialize
* them if scan descriptor is not being deleted.
*/ */
} }
...@@ -544,7 +545,7 @@ heap_open(Oid relationId, LOCKMODE lockmode) ...@@ -544,7 +545,7 @@ heap_open(Oid relationId, LOCKMODE lockmode)
if (lockmode == NoLock) if (lockmode == NoLock)
return r; /* caller must check RelationIsValid! */ return r; /* caller must check RelationIsValid! */
if (! RelationIsValid(r)) if (!RelationIsValid(r))
elog(ERROR, "Relation %u does not exist", relationId); elog(ERROR, "Relation %u does not exist", relationId);
LockRelation(r, lockmode); LockRelation(r, lockmode);
...@@ -586,7 +587,7 @@ heap_openr(const char *relationName, LOCKMODE lockmode) ...@@ -586,7 +587,7 @@ heap_openr(const char *relationName, LOCKMODE lockmode)
if (lockmode == NoLock) if (lockmode == NoLock)
return r; /* caller must check RelationIsValid! */ return r; /* caller must check RelationIsValid! */
if (! RelationIsValid(r)) if (!RelationIsValid(r))
elog(ERROR, "Relation '%s' does not exist", relationName); elog(ERROR, "Relation '%s' does not exist", relationName);
LockRelation(r, lockmode); LockRelation(r, lockmode);
...@@ -646,7 +647,7 @@ heap_beginscan(Relation relation, ...@@ -646,7 +647,7 @@ heap_beginscan(Relation relation,
* sanity checks * sanity checks
* ---------------- * ----------------
*/ */
if (! RelationIsValid(relation)) if (!RelationIsValid(relation))
elog(ERROR, "heap_beginscan: !RelationIsValid(relation)"); elog(ERROR, "heap_beginscan: !RelationIsValid(relation)");
/* ---------------- /* ----------------
...@@ -681,6 +682,7 @@ heap_beginscan(Relation relation, ...@@ -681,6 +682,7 @@ heap_beginscan(Relation relation,
scan->rs_nkeys = (short) nkeys; scan->rs_nkeys = (short) nkeys;
if (nkeys) if (nkeys)
/* /*
* we do this here instead of in initscan() because heap_rescan * we do this here instead of in initscan() because heap_rescan
* also calls initscan() and we don't want to allocate memory * also calls initscan() and we don't want to allocate memory
...@@ -847,9 +849,7 @@ heap_getnext(HeapScanDesc scandesc, int backw) ...@@ -847,9 +849,7 @@ heap_getnext(HeapScanDesc scandesc, int backw)
if (scan->rs_ptup.t_data == scan->rs_ctup.t_data && if (scan->rs_ptup.t_data == scan->rs_ctup.t_data &&
BufferIsInvalid(scan->rs_pbuf)) BufferIsInvalid(scan->rs_pbuf))
{
return NULL; return NULL;
}
/* /*
* Copy the "current" tuple/buffer to "next". Pin/unpin the * Copy the "current" tuple/buffer to "next". Pin/unpin the
...@@ -1095,8 +1095,10 @@ heap_fetch(Relation relation, ...@@ -1095,8 +1095,10 @@ heap_fetch(Relation relation,
} }
else else
{ {
/* All checks passed, so return the tuple as valid.
* Caller is now responsible for releasing the buffer. /*
* All checks passed, so return the tuple as valid. Caller is now
* responsible for releasing the buffer.
*/ */
*userbuf = buffer; *userbuf = buffer;
} }
...@@ -1119,7 +1121,8 @@ heap_get_latest_tid(Relation relation, ...@@ -1119,7 +1121,8 @@ heap_get_latest_tid(Relation relation,
HeapTupleData tp; HeapTupleData tp;
HeapTupleHeader t_data; HeapTupleHeader t_data;
ItemPointerData ctid; ItemPointerData ctid;
bool invalidBlock,linkend; bool invalidBlock,
linkend;
/* ---------------- /* ----------------
* get the buffer from the relation descriptor * get the buffer from the relation descriptor
...@@ -1300,10 +1303,11 @@ l1: ...@@ -1300,10 +1303,11 @@ l1:
LockBuffer(buffer, BUFFER_LOCK_EXCLUSIVE); LockBuffer(buffer, BUFFER_LOCK_EXCLUSIVE);
if (TransactionIdDidAbort(xwait)) if (TransactionIdDidAbort(xwait))
goto l1; goto l1;
/* /*
* xwait is committed but if xwait had just marked * xwait is committed but if xwait had just marked the tuple for
* the tuple for update then some other xaction could * update then some other xaction could update this tuple before
* update this tuple before we got to this point. * we got to this point.
*/ */
if (tp.t_data->t_xmax != xwait) if (tp.t_data->t_xmax != xwait)
goto l1; goto l1;
...@@ -1396,10 +1400,11 @@ l2: ...@@ -1396,10 +1400,11 @@ l2:
LockBuffer(buffer, BUFFER_LOCK_EXCLUSIVE); LockBuffer(buffer, BUFFER_LOCK_EXCLUSIVE);
if (TransactionIdDidAbort(xwait)) if (TransactionIdDidAbort(xwait))
goto l2; goto l2;
/* /*
* xwait is committed but if xwait had just marked * xwait is committed but if xwait had just marked the tuple for
* the tuple for update then some other xaction could * update then some other xaction could update this tuple before
* update this tuple before we got to this point. * we got to this point.
*/ */
if (oldtup.t_data->t_xmax != xwait) if (oldtup.t_data->t_xmax != xwait)
goto l2; goto l2;
...@@ -1521,10 +1526,11 @@ l3: ...@@ -1521,10 +1526,11 @@ l3:
LockBuffer(*buffer, BUFFER_LOCK_EXCLUSIVE); LockBuffer(*buffer, BUFFER_LOCK_EXCLUSIVE);
if (TransactionIdDidAbort(xwait)) if (TransactionIdDidAbort(xwait))
goto l3; goto l3;
/* /*
* xwait is committed but if xwait had just marked * xwait is committed but if xwait had just marked the tuple for
* the tuple for update then some other xaction could * update then some other xaction could update this tuple before
* update this tuple before we got to this point. * we got to this point.
*/ */
if (tuple->t_data->t_xmax != xwait) if (tuple->t_data->t_xmax != xwait)
goto l3; goto l3;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Id: hio.c,v 1.30 2000/03/17 02:36:02 tgl Exp $ * $Id: hio.c,v 1.31 2000/04/12 17:14:45 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -111,8 +111,8 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple) ...@@ -111,8 +111,8 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple)
len = 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... * If we're gonna fail for oversize tuple, do it right away... this
* this code should go away eventually. * code should go away eventually.
*/ */
if (len > MaxTupleSize) if (len > MaxTupleSize)
elog(ERROR, "Tuple is too big: size %u, max size %ld", elog(ERROR, "Tuple is too big: size %u, max size %ld",
...@@ -136,8 +136,8 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple) ...@@ -136,8 +136,8 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple)
lastblock = RelationGetNumberOfBlocks(relation); lastblock = RelationGetNumberOfBlocks(relation);
/* /*
* Get the last existing page --- may need to create the first one * Get the last existing page --- may need to create the first one if
* if this is a virgin relation. * this is a virgin relation.
*/ */
if (lastblock == 0) if (lastblock == 0)
{ {
...@@ -168,12 +168,14 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple) ...@@ -168,12 +168,14 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple)
if (len > PageGetFreeSpace(pageHeader)) if (len > PageGetFreeSpace(pageHeader))
{ {
/* /*
* BUG: by elog'ing here, we leave the new buffer locked and not * BUG: by elog'ing here, we leave the new buffer locked and
* marked dirty, which may result in an invalid page header * not marked dirty, which may result in an invalid page
* being left on disk. But we should not get here given the * header being left on disk. But we should not get here
* test at the top of the routine, and the whole deal should * given the test at the top of the routine, and the whole
* go away when we implement tuple splitting anyway... * deal should go away when we implement tuple splitting
* anyway...
*/ */
elog(ERROR, "Tuple is too big: size %u", len); elog(ERROR, "Tuple is too big: size %u", len);
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/heap/tuptoaster.c,v 1.2 2000/01/20 21:50:59 petere Exp $ * $Header: /cvsroot/pgsql/src/backend/access/heap/tuptoaster.c,v 1.3 2000/04/12 17:14:45 momjian Exp $
* *
* *
* INTERFACE ROUTINES * INTERFACE ROUTINES
...@@ -30,14 +30,14 @@ ...@@ -30,14 +30,14 @@
#ifdef TUPLE_TOASTER_ACTIVE #ifdef TUPLE_TOASTER_ACTIVE
void void
heap_tuple_toast_attrs (Relation rel, HeapTuple newtup, HeapTuple oldtup) heap_tuple_toast_attrs(Relation rel, HeapTuple newtup, HeapTuple oldtup)
{ {
return; return;
} }
varattrib * varattrib *
heap_tuple_untoast_attr (varattrib *attr) heap_tuple_untoast_attr(varattrib * attr)
{ {
elog(ERROR, "heap_tuple_untoast_attr() called"); elog(ERROR, "heap_tuple_untoast_attr() called");
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.24 2000/03/14 23:52:01 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.25 2000/04/12 17:14:47 momjian Exp $
* *
* NOTES * NOTES
* many of the old access method routines have been turned into * many of the old access method routines have been turned into
...@@ -114,7 +114,10 @@ RelationGetIndexScan(Relation relation, ...@@ -114,7 +114,10 @@ RelationGetIndexScan(Relation relation,
ItemPointerSetInvalid(&scan->currentMarkData); ItemPointerSetInvalid(&scan->currentMarkData);
ItemPointerSetInvalid(&scan->nextMarkData); ItemPointerSetInvalid(&scan->nextMarkData);
/* mark cached function lookup data invalid; it will be set on first use */ /*
* mark cached function lookup data invalid; it will be set on first
* use
*/
scan->fn_getnext.fn_oid = InvalidOid; scan->fn_getnext.fn_oid = InvalidOid;
if (numberOfKeys > 0) if (numberOfKeys > 0)
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.41 2000/03/14 23:52:01 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.42 2000/04/12 17:14:47 momjian Exp $
* *
* INTERFACE ROUTINES * INTERFACE ROUTINES
* index_open - open an index relation by relationId * index_open - open an index relation by relationId
...@@ -129,7 +129,7 @@ index_open(Oid relationId) ...@@ -129,7 +129,7 @@ index_open(Oid relationId)
r = RelationIdGetRelation(relationId); r = RelationIdGetRelation(relationId);
if (! RelationIsValid(r)) if (!RelationIsValid(r))
elog(ERROR, "Index %u does not exist", relationId); elog(ERROR, "Index %u does not exist", relationId);
if (r->rd_rel->relkind != RELKIND_INDEX) if (r->rd_rel->relkind != RELKIND_INDEX)
...@@ -151,7 +151,7 @@ index_openr(char *relationName) ...@@ -151,7 +151,7 @@ index_openr(char *relationName)
r = RelationNameGetRelation(relationName); r = RelationNameGetRelation(relationName);
if (! RelationIsValid(r)) if (!RelationIsValid(r))
elog(ERROR, "Index '%s' does not exist", relationName); elog(ERROR, "Index '%s' does not exist", relationName);
if (r->rd_rel->relkind != RELKIND_INDEX) if (r->rd_rel->relkind != RELKIND_INDEX)
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.41 2000/02/18 09:29:16 inoue Exp $ * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.42 2000/04/12 17:14:47 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.33 2000/02/10 19:51:38 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.34 2000/04/12 17:14:49 momjian Exp $
* *
* NOTES * NOTES
* These functions are stored in pg_amproc. For each operator class * These functions are stored in pg_amproc. For each operator class
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.56 2000/03/17 02:36:03 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.57 2000/04/12 17:14:49 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -267,21 +267,20 @@ _bt_insertonpg(Relation rel, ...@@ -267,21 +267,20 @@ _bt_insertonpg(Relation rel,
itemsz = IndexTupleDSize(btitem->bti_itup) itemsz = IndexTupleDSize(btitem->bti_itup)
+ (sizeof(BTItemData) - sizeof(IndexTupleData)); + (sizeof(BTItemData) - sizeof(IndexTupleData));
itemsz = MAXALIGN(itemsz); /* be safe, PageAddItem will do itemsz = MAXALIGN(itemsz); /* be safe, PageAddItem will do this but
* this but we need to be * we need to be consistent */
* consistent */
/* /*
* Check whether the item can fit on a btree page at all. * Check whether the item can fit on a btree page at all. (Eventually,
* (Eventually, we ought to try to apply TOAST methods if not.) * we ought to try to apply TOAST methods if not.) We actually need to
* We actually need to be able to fit three items on every page, * be able to fit three items on every page, so restrict any one item
* so restrict any one item to 1/3 the per-page available space. * to 1/3 the per-page available space. Note that at this point,
* Note that at this point, itemsz doesn't include the ItemId. * itemsz doesn't include the ItemId.
*/ */
if (itemsz > (PageGetPageSize(page)-sizeof(PageHeaderData)-MAXALIGN(sizeof(BTPageOpaqueData)))/3 - sizeof(ItemIdData)) if (itemsz > (PageGetPageSize(page) - sizeof(PageHeaderData) - MAXALIGN(sizeof(BTPageOpaqueData))) / 3 - sizeof(ItemIdData))
elog(ERROR, "btree: index item size %u exceeds maximum %lu", elog(ERROR, "btree: index item size %u exceeds maximum %lu",
itemsz, itemsz,
(PageGetPageSize(page)-sizeof(PageHeaderData)-MAXALIGN(sizeof(BTPageOpaqueData)))/3 - sizeof(ItemIdData)); (PageGetPageSize(page) - sizeof(PageHeaderData) - MAXALIGN(sizeof(BTPageOpaqueData))) /3 - sizeof(ItemIdData));
/* /*
* If we have to insert item on the leftmost page which is the first * If we have to insert item on the leftmost page which is the first
...@@ -415,8 +414,8 @@ _bt_insertonpg(Relation rel, ...@@ -415,8 +414,8 @@ _bt_insertonpg(Relation rel,
bool is_root = lpageop->btpo_flags & BTP_ROOT; bool is_root = lpageop->btpo_flags & BTP_ROOT;
/* /*
* Instead of splitting leaf page in the chain of duplicates * Instead of splitting leaf page in the chain of duplicates by
* by new duplicate, insert it into some right page. * new duplicate, insert it into some right page.
*/ */
if ((lpageop->btpo_flags & BTP_CHAIN) && if ((lpageop->btpo_flags & BTP_CHAIN) &&
(lpageop->btpo_flags & BTP_LEAF) && keys_equal) (lpageop->btpo_flags & BTP_LEAF) && keys_equal)
...@@ -424,6 +423,7 @@ _bt_insertonpg(Relation rel, ...@@ -424,6 +423,7 @@ _bt_insertonpg(Relation rel,
rbuf = _bt_getbuf(rel, lpageop->btpo_next, BT_WRITE); rbuf = _bt_getbuf(rel, lpageop->btpo_next, BT_WRITE);
rpage = BufferGetPage(rbuf); rpage = BufferGetPage(rbuf);
rpageop = (BTPageOpaque) PageGetSpecialPointer(rpage); rpageop = (BTPageOpaque) PageGetSpecialPointer(rpage);
/* /*
* some checks * some checks
*/ */
...@@ -442,6 +442,7 @@ _bt_insertonpg(Relation rel, ...@@ -442,6 +442,7 @@ _bt_insertonpg(Relation rel,
BTGreaterStrategyNumber)) BTGreaterStrategyNumber))
elog(FATAL, "btree: hikey is out of order"); elog(FATAL, "btree: hikey is out of order");
else if (rpageop->btpo_flags & BTP_CHAIN) else if (rpageop->btpo_flags & BTP_CHAIN)
/* /*
* If hikey > scankey then it's last page in chain and * If hikey > scankey then it's last page in chain and
* BTP_CHAIN must be OFF * BTP_CHAIN must be OFF
...@@ -450,9 +451,7 @@ _bt_insertonpg(Relation rel, ...@@ -450,9 +451,7 @@ _bt_insertonpg(Relation rel,
} }
else else
/* rightmost page */ /* rightmost page */
{
Assert(!(rpageop->btpo_flags & BTP_CHAIN)); Assert(!(rpageop->btpo_flags & BTP_CHAIN));
}
_bt_relbuf(rel, buf, BT_WRITE); _bt_relbuf(rel, buf, BT_WRITE);
return (_bt_insertonpg(rel, rbuf, stack, keysz, return (_bt_insertonpg(rel, rbuf, stack, keysz,
scankey, btitem, afteritem)); scankey, btitem, afteritem));
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.35 2000/01/26 05:55:58 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.36 2000/04/12 17:14:49 momjian Exp $
* *
* NOTES * NOTES
* Postgres btree pages look like ordinary relation pages. The opaque * Postgres btree pages look like ordinary relation pages. The opaque
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.53 2000/02/18 09:29:54 inoue Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.54 2000/04/12 17:14:49 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -185,7 +185,7 @@ btbuild(Relation heap, ...@@ -185,7 +185,7 @@ btbuild(Relation heap,
#ifndef OMIT_PARTIAL_INDEX #ifndef OMIT_PARTIAL_INDEX
/* SetSlotContents(slot, htup); */ /* SetSlotContents(slot, htup); */
slot->val = htup; slot->val = htup;
if (! ExecQual((List *) pred, econtext, false)) if (!ExecQual((List *) pred, econtext, false))
continue; continue;
#endif /* OMIT_PARTIAL_INDEX */ #endif /* OMIT_PARTIAL_INDEX */
} }
...@@ -276,9 +276,9 @@ btbuild(Relation heap, ...@@ -276,9 +276,9 @@ btbuild(Relation heap,
} }
/* /*
* if we are doing bottom-up btree build, finish the build by * if we are doing bottom-up btree build, finish the build by (1)
* (1) completing the sort of the spool file, (2) inserting the * completing the sort of the spool file, (2) inserting the sorted
* sorted tuples into btree pages and (3) building the upper levels. * tuples into btree pages and (3) building the upper levels.
*/ */
if (usefast) if (usefast)
{ {
...@@ -298,13 +298,13 @@ btbuild(Relation heap, ...@@ -298,13 +298,13 @@ btbuild(Relation heap,
/* /*
* Since we just counted the tuples in the heap, we update its stats * Since we just counted the tuples in the heap, we update its stats
* in pg_class to guarantee that the planner takes advantage of the * in pg_class to guarantee that the planner takes advantage of the
* index we just created. But, only update statistics during * index we just created. But, only update statistics during normal
* normal index definitions, not for indices on system catalogs * index definitions, not for indices on system catalogs created
* created during bootstrap processing. We must close the relations * during bootstrap processing. We must close the relations before
* before updating statistics to guarantee that the relcache entries * updating statistics to guarantee that the relcache entries are
* are flushed when we increment the command counter in UpdateStats(). * flushed when we increment the command counter in UpdateStats(). But
* But we do not release any locks on the relations; those will be * we do not release any locks on the relations; those will be held
* held until end of transaction. * until end of transaction.
*/ */
if (IsNormalProcessingMode()) if (IsNormalProcessingMode())
{ {
...@@ -314,9 +314,10 @@ btbuild(Relation heap, ...@@ -314,9 +314,10 @@ btbuild(Relation heap,
heap_close(heap, NoLock); heap_close(heap, NoLock);
index_close(index); index_close(index);
/* /*
UpdateStats(hrelid, nhtups, true); * UpdateStats(hrelid, nhtups, true); UpdateStats(irelid, nitups,
UpdateStats(irelid, nitups, false); * false);
*/ */
UpdateStats(hrelid, nhtups, inplace); UpdateStats(hrelid, nhtups, inplace);
UpdateStats(irelid, nitups, inplace); UpdateStats(irelid, nitups, inplace);
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.30 2000/01/26 05:55:58 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.31 2000/04/12 17:14:49 momjian Exp $
* *
* *
* NOTES * NOTES
...@@ -52,13 +52,16 @@ static void _bt_scandel(IndexScanDesc scan, BlockNumber blkno, OffsetNumber offn ...@@ -52,13 +52,16 @@ static void _bt_scandel(IndexScanDesc scan, BlockNumber blkno, OffsetNumber offn
void void
AtEOXact_nbtree(void) AtEOXact_nbtree(void)
{ {
/* Note: these actions should only be necessary during xact abort;
* but they can't hurt during a commit. /*
* Note: these actions should only be necessary during xact abort; but
* they can't hurt during a commit.
*/ */
/* Reset the active-scans list to empty. /*
* We do not need to free the list elements, because they're all * Reset the active-scans list to empty. We do not need to free the
* palloc()'d, so they'll go away at end of transaction anyway. * list elements, because they're all palloc()'d, so they'll go away
* at end of transaction anyway.
*/ */
BTScans = NULL; BTScans = NULL;
...@@ -96,7 +99,7 @@ _bt_dropscan(IndexScanDesc scan) ...@@ -96,7 +99,7 @@ _bt_dropscan(IndexScanDesc scan)
last = chk; last = chk;
if (chk == (BTScanList) NULL) if (chk == (BTScanList) NULL)
elog(ERROR, "btree scan list trashed; can't find 0x%p", (void*)scan); elog(ERROR, "btree scan list trashed; can't find 0x%p", (void *) scan);
if (last == (BTScanList) NULL) if (last == (BTScanList) NULL)
BTScans = chk->btsl_next; BTScans = chk->btsl_next;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.58 2000/03/17 02:36:04 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.59 2000/04/12 17:14:49 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -299,9 +299,7 @@ _bt_skeycmp(Relation rel, ...@@ -299,9 +299,7 @@ _bt_skeycmp(Relation rel,
compare = -1; /* not-NULL key "<" NULL datum */ compare = -1; /* not-NULL key "<" NULL datum */
} }
else else
{
compare = (int32) FMGR_PTR2(&entry->sk_func, keyDatum, attrDatum); compare = (int32) FMGR_PTR2(&entry->sk_func, keyDatum, attrDatum);
}
if (compare != 0) if (compare != 0)
break; /* done when we find unequal attributes */ break; /* done when we find unequal attributes */
...@@ -368,19 +366,18 @@ _bt_binsrch(Relation rel, ...@@ -368,19 +366,18 @@ _bt_binsrch(Relation rel,
/* /*
* If there are no keys on the page, return the first available slot. * If there are no keys on the page, return the first available slot.
* Note this covers two cases: the page is really empty (no keys), * Note this covers two cases: the page is really empty (no keys), or
* or it contains only a high key. The latter case is possible after * it contains only a high key. The latter case is possible after
* vacuuming. * vacuuming.
*/ */
if (high < low) if (high < low)
return low; return low;
/* /*
* Binary search to find the first key on the page >= scan key. * Binary search to find the first key on the page >= scan key. Loop
* Loop invariant: all slots before 'low' are < scan key, all slots * invariant: all slots before 'low' are < scan key, all slots at or
* at or after 'high' are >= scan key. Also, haveEq is true if the * after 'high' are >= scan key. Also, haveEq is true if the tuple at
* tuple at 'high' is == scan key. * 'high' is == scan key. We can fall out when high == low.
* We can fall out when high == low.
*/ */
high++; /* establish the loop invariant for high */ high++; /* establish the loop invariant for high */
haveEq = false; haveEq = false;
...@@ -388,6 +385,7 @@ _bt_binsrch(Relation rel, ...@@ -388,6 +385,7 @@ _bt_binsrch(Relation rel,
while (high > low) while (high > low)
{ {
OffsetNumber mid = low + ((high - low) / 2); OffsetNumber mid = low + ((high - low) / 2);
/* We have low <= mid < high, so mid points at a real slot */ /* We have low <= mid < high, so mid points at a real slot */
result = _bt_compare(rel, itupdesc, page, keysz, scankey, mid); result = _bt_compare(rel, itupdesc, page, keysz, scankey, mid);
...@@ -443,18 +441,20 @@ _bt_binsrch(Relation rel, ...@@ -443,18 +441,20 @@ _bt_binsrch(Relation rel,
if (haveEq) if (haveEq)
{ {
/* /*
* There is an equal key. We return either the first equal key * There is an equal key. We return either the first equal key
* (which we just found), or the last lesser key. * (which we just found), or the last lesser key.
* *
* We need not check srchtype != BT_DESCENT here, since if that * We need not check srchtype != BT_DESCENT here, since if that is
* is true then natts == keysz by assumption. * true then natts == keysz by assumption.
*/ */
if (natts == keysz) if (natts == keysz)
return low; /* return first equal key */ return low; /* return first equal key */
} }
else else
{ {
/* /*
* There is no equal key. We return either the first greater key * There is no equal key. We return either the first greater key
* (which we just found), or the last lesser key. * (which we just found), or the last lesser key.
...@@ -524,6 +524,7 @@ _bt_compare(Relation rel, ...@@ -524,6 +524,7 @@ _bt_compare(Relation rel,
&& P_LEFTMOST(opaque) && P_LEFTMOST(opaque)
&& offnum == P_HIKEY) && offnum == P_HIKEY)
{ {
/* /*
* we just have to believe that this will only be called with * we just have to believe that this will only be called with
* offnum == P_HIKEY when P_HIKEY is the OffsetNumber of the first * offnum == P_HIKEY when P_HIKEY is the OffsetNumber of the first
...@@ -704,7 +705,8 @@ _bt_first(IndexScanDesc scan, ScanDirection dir) ...@@ -704,7 +705,8 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
ScanKey scankeys = 0; ScanKey scankeys = 0;
int keysCount = 0; int keysCount = 0;
int *nKeyIs = 0; int *nKeyIs = 0;
int i, j; int i,
j;
StrategyNumber strat_total; StrategyNumber strat_total;
rel = scan->relation; rel = scan->relation;
...@@ -730,8 +732,8 @@ _bt_first(IndexScanDesc scan, ScanDirection dir) ...@@ -730,8 +732,8 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
{ {
AttrNumber attno; AttrNumber attno;
nKeyIs = (int *)palloc(so->numberOfKeys*sizeof(int)); nKeyIs = (int *) palloc(so->numberOfKeys * sizeof(int));
for (i=0; i < so->numberOfKeys; i++) for (i = 0; i < so->numberOfKeys; i++)
{ {
attno = so->keyData[i].sk_attno; attno = so->keyData[i].sk_attno;
if (attno == keysCount) if (attno == keysCount)
...@@ -748,7 +750,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir) ...@@ -748,7 +750,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
} }
if (ScanDirectionIsBackward(dir) && if (ScanDirectionIsBackward(dir) &&
(strat == BTLessStrategyNumber || (strat == BTLessStrategyNumber ||
strat == BTLessEqualStrategyNumber) ) strat == BTLessEqualStrategyNumber))
{ {
nKeyIs[keysCount++] = i; nKeyIs[keysCount++] = i;
strat_total = strat; strat_total = strat;
...@@ -758,7 +760,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir) ...@@ -758,7 +760,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
} }
if (ScanDirectionIsForward(dir) && if (ScanDirectionIsForward(dir) &&
(strat == BTGreaterStrategyNumber || (strat == BTGreaterStrategyNumber ||
strat == BTGreaterEqualStrategyNumber) ) strat == BTGreaterEqualStrategyNumber))
{ {
nKeyIs[keysCount++] = i; nKeyIs[keysCount++] = i;
strat_total = strat; strat_total = strat;
...@@ -794,8 +796,8 @@ _bt_first(IndexScanDesc scan, ScanDirection dir) ...@@ -794,8 +796,8 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
* at the right place in the scan. * at the right place in the scan.
*/ */
/* _bt_orderkeys disallows it, but it's place to add some code latter */ /* _bt_orderkeys disallows it, but it's place to add some code latter */
scankeys = (ScanKey)palloc(keysCount*sizeof(ScanKeyData)); scankeys = (ScanKey) palloc(keysCount * sizeof(ScanKeyData));
for (i=0; i < keysCount; i++) for (i = 0; i < keysCount; i++)
{ {
j = nKeyIs[i]; j = nKeyIs[i];
if (so->keyData[j].sk_flags & SK_ISNULL) if (so->keyData[j].sk_flags & SK_ISNULL)
...@@ -805,11 +807,12 @@ _bt_first(IndexScanDesc scan, ScanDirection dir) ...@@ -805,11 +807,12 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
elog(ERROR, "_bt_first: btree doesn't support is(not)null, yet"); elog(ERROR, "_bt_first: btree doesn't support is(not)null, yet");
return ((RetrieveIndexResult) NULL); return ((RetrieveIndexResult) NULL);
} }
proc = index_getprocid(rel, i+1, BTORDER_PROC); proc = index_getprocid(rel, i + 1, BTORDER_PROC);
ScanKeyEntryInitialize(scankeys+i, so->keyData[j].sk_flags, ScanKeyEntryInitialize(scankeys + i, so->keyData[j].sk_flags,
i+1, proc, so->keyData[j].sk_argument); i + 1, proc, so->keyData[j].sk_argument);
} }
if (nKeyIs) pfree(nKeyIs); if (nKeyIs)
pfree(nKeyIs);
stack = _bt_search(rel, keysCount, scankeys, &buf); stack = _bt_search(rel, keysCount, scankeys, &buf);
_bt_freestack(stack); _bt_freestack(stack);
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsort.c,v 1.51 2000/02/18 06:32:39 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsort.c,v 1.52 2000/04/12 17:14:49 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -99,9 +99,9 @@ _bt_spoolinit(Relation index, bool isunique) ...@@ -99,9 +99,9 @@ _bt_spoolinit(Relation index, bool isunique)
btspool->sortstate = tuplesort_begin_index(index, isunique, false); btspool->sortstate = tuplesort_begin_index(index, isunique, false);
/* /*
* Currently, tuplesort provides sort functions on IndexTuples. * Currently, tuplesort provides sort functions on IndexTuples. If we
* If we kept anything in a BTItem other than a regular IndexTuple, * kept anything in a BTItem other than a regular IndexTuple, we'd
* we'd need to modify tuplesort to understand BTItems as such. * need to modify tuplesort to understand BTItems as such.
*/ */
Assert(sizeof(BTItemData) == sizeof(IndexTupleData)); Assert(sizeof(BTItemData) == sizeof(IndexTupleData));
...@@ -306,20 +306,20 @@ _bt_buildadd(Relation index, Size keysz, ScanKey scankey, ...@@ -306,20 +306,20 @@ _bt_buildadd(Relation index, Size keysz, ScanKey scankey,
btisz = MAXALIGN(btisz); btisz = MAXALIGN(btisz);
/* /*
* Check whether the item can fit on a btree page at all. * Check whether the item can fit on a btree page at all. (Eventually,
* (Eventually, we ought to try to apply TOAST methods if not.) * we ought to try to apply TOAST methods if not.) We actually need to
* We actually need to be able to fit three items on every page, * be able to fit three items on every page, so restrict any one item
* so restrict any one item to 1/3 the per-page available space. * to 1/3 the per-page available space. Note that at this point, btisz
* Note that at this point, btisz doesn't include the ItemId. * doesn't include the ItemId.
* *
* NOTE: similar code appears in _bt_insertonpg() to defend against * NOTE: similar code appears in _bt_insertonpg() to defend against
* oversize items being inserted into an already-existing index. * oversize items being inserted into an already-existing index. But
* But during creation of an index, we don't go through there. * during creation of an index, we don't go through there.
*/ */
if (btisz > (PageGetPageSize(npage)-sizeof(PageHeaderData)-MAXALIGN(sizeof(BTPageOpaqueData)))/3 - sizeof(ItemIdData)) if (btisz > (PageGetPageSize(npage) - sizeof(PageHeaderData) - MAXALIGN(sizeof(BTPageOpaqueData))) / 3 - sizeof(ItemIdData))
elog(ERROR, "btree: index item size %d exceeds maximum %ld", elog(ERROR, "btree: index item size %d exceeds maximum %ld",
btisz, btisz,
(PageGetPageSize(npage)-sizeof(PageHeaderData)-MAXALIGN(sizeof(BTPageOpaqueData)))/3 - sizeof(ItemIdData)); (PageGetPageSize(npage) - sizeof(PageHeaderData) - MAXALIGN(sizeof(BTPageOpaqueData))) /3 - sizeof(ItemIdData));
if (pgspc < btisz) if (pgspc < btisz)
{ {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.35 2000/02/18 06:32:39 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.36 2000/04/12 17:14:50 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -141,7 +141,8 @@ _bt_orderkeys(Relation relation, BTScanOpaque so) ...@@ -141,7 +141,8 @@ _bt_orderkeys(Relation relation, BTScanOpaque so)
uint16 numberOfKeys = so->numberOfKeys; uint16 numberOfKeys = so->numberOfKeys;
uint16 new_numberOfKeys = 0; uint16 new_numberOfKeys = 0;
AttrNumber attno = 1; AttrNumber attno = 1;
bool equalStrategyEnd, underEqualStrategy; bool equalStrategyEnd,
underEqualStrategy;
if (numberOfKeys < 1) if (numberOfKeys < 1)
return; return;
...@@ -194,6 +195,7 @@ _bt_orderkeys(Relation relation, BTScanOpaque so) ...@@ -194,6 +195,7 @@ _bt_orderkeys(Relation relation, BTScanOpaque so)
elog(ERROR, "_bt_orderkeys: key(s) for attribute %d missed", attno + 1); elog(ERROR, "_bt_orderkeys: key(s) for attribute %d missed", attno + 1);
underEqualStrategy = (!equalStrategyEnd); underEqualStrategy = (!equalStrategyEnd);
/* /*
* If = has been specified, no other key will be used. In case * If = has been specified, no other key will be used. In case
* of key < 2 && key == 1 and so on we have to set qual_ok to * of key < 2 && key == 1 and so on we have to set qual_ok to
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.44 2000/03/01 05:39:23 inoue Exp $ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.45 2000/04/12 17:14:51 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -181,7 +181,7 @@ rtbuild(Relation heap, ...@@ -181,7 +181,7 @@ rtbuild(Relation heap,
#ifndef OMIT_PARTIAL_INDEX #ifndef OMIT_PARTIAL_INDEX
/* SetSlotContents(slot, htup); */ /* SetSlotContents(slot, htup); */
slot->val = htup; slot->val = htup;
if (! ExecQual((List *) pred, econtext, false)) if (!ExecQual((List *) pred, econtext, false))
continue; continue;
#endif /* OMIT_PARTIAL_INDEX */ #endif /* OMIT_PARTIAL_INDEX */
} }
...@@ -249,13 +249,13 @@ rtbuild(Relation heap, ...@@ -249,13 +249,13 @@ rtbuild(Relation heap,
/* /*
* Since we just counted the tuples in the heap, we update its stats * Since we just counted the tuples in the heap, we update its stats
* in pg_class to guarantee that the planner takes advantage of the * in pg_class to guarantee that the planner takes advantage of the
* index we just created. But, only update statistics during * index we just created. But, only update statistics during normal
* normal index definitions, not for indices on system catalogs * index definitions, not for indices on system catalogs created
* created during bootstrap processing. We must close the relations * during bootstrap processing. We must close the relations before
* before updating statistics to guarantee that the relcache entries * updating statistics to guarantee that the relcache entries are
* are flushed when we increment the command counter in UpdateStats(). * flushed when we increment the command counter in UpdateStats(). But
* But we do not release any locks on the relations; those will be * we do not release any locks on the relations; those will be held
* held until end of transaction. * until end of transaction.
*/ */
if (IsNormalProcessingMode()) if (IsNormalProcessingMode())
{ {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.31 2000/01/26 05:56:00 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.32 2000/04/12 17:14:51 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -268,7 +268,7 @@ rtdropscan(IndexScanDesc s) ...@@ -268,7 +268,7 @@ rtdropscan(IndexScanDesc s)
prev = l; prev = l;
if (l == (RTScanList) NULL) if (l == (RTScanList) NULL)
elog(ERROR, "rtree scan list corrupted -- cannot find 0x%p", (void*)s); elog(ERROR, "rtree scan list corrupted -- cannot find 0x%p", (void *) s);
if (prev == (RTScanList) NULL) if (prev == (RTScanList) NULL)
RTScans = l->rtsl_next; RTScans = l->rtsl_next;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.33 2000/01/26 05:56:03 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.34 2000/04/12 17:14:52 momjian Exp $
* *
* NOTES * NOTES
* This file contains the high level access-method interface to the * This file contains the high level access-method interface to the
...@@ -162,6 +162,7 @@ TransactionLogTest(TransactionId transactionId, /* transaction id to test */ ...@@ -162,6 +162,7 @@ TransactionLogTest(TransactionId transactionId, /* transaction id to test */
if (!fail) if (!fail)
{ {
/* /*
* DO NOT cache status for transactions in unknown state !!! * DO NOT cache status for transactions in unknown state !!!
*/ */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.27 2000/03/31 02:43:31 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.28 2000/04/12 17:14:53 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -331,8 +331,8 @@ ReadNewTransactionId(TransactionId *xid) ...@@ -331,8 +331,8 @@ ReadNewTransactionId(TransactionId *xid)
SpinAcquire(OidGenLockId); /* not good for concurrency... */ SpinAcquire(OidGenLockId); /* not good for concurrency... */
/* /*
* Note that we don't check is ShmemVariableCache->xid_count equal * Note that we don't check is ShmemVariableCache->xid_count equal to
* to 0 or not. This will work as long as we don't call * 0 or not. This will work as long as we don't call
* ReadNewTransactionId() before GetNewTransactionId(). * ReadNewTransactionId() before GetNewTransactionId().
*/ */
if (ShmemVariableCache->nextXid == 0) if (ShmemVariableCache->nextXid == 0)
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.63 2000/04/09 04:43:16 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.64 2000/04/12 17:14:53 momjian Exp $
* *
* NOTES * NOTES
* Transaction aborts can now occur two ways: * Transaction aborts can now occur two ways:
...@@ -517,8 +517,8 @@ CommandCounterIncrement() ...@@ -517,8 +517,8 @@ CommandCounterIncrement()
CurrentTransactionStateData.scanCommandId = CurrentTransactionStateData.commandId; CurrentTransactionStateData.scanCommandId = CurrentTransactionStateData.commandId;
/* /*
* make cache changes visible to me. AtCommit_LocalCache() * make cache changes visible to me. AtCommit_LocalCache() instead of
* instead of AtCommit_Cache() is called here. * AtCommit_Cache() is called here.
*/ */
AtCommit_LocalCache(); AtCommit_LocalCache();
AtStart_Cache(); AtStart_Cache();
...@@ -628,15 +628,14 @@ RecordTransactionCommit() ...@@ -628,15 +628,14 @@ RecordTransactionCommit()
xid = GetCurrentTransactionId(); xid = GetCurrentTransactionId();
/* /*
* flush the buffer manager pages. Note: if we have stable * flush the buffer manager pages. Note: if we have stable main
* main memory, dirty shared buffers are not flushed * memory, dirty shared buffers are not flushed plai 8/7/90
* plai 8/7/90
*/ */
leak = BufferPoolCheckLeak(); leak = BufferPoolCheckLeak();
/* /*
* If no one shared buffer was changed by this transaction then * If no one shared buffer was changed by this transaction then we
* we don't flush shared buffers and don't record commit status. * don't flush shared buffers and don't record commit status.
*/ */
if (SharedBufferChanged) if (SharedBufferChanged)
{ {
...@@ -645,8 +644,8 @@ RecordTransactionCommit() ...@@ -645,8 +644,8 @@ RecordTransactionCommit()
ResetBufferPool(true); ResetBufferPool(true);
/* /*
* have the transaction access methods record the status * have the transaction access methods record the status of this
* of this transaction id in the pg_log relation. * transaction id in the pg_log relation.
*/ */
TransactionIdCommit(xid); TransactionIdCommit(xid);
...@@ -752,9 +751,9 @@ RecordTransactionAbort() ...@@ -752,9 +751,9 @@ RecordTransactionAbort()
xid = GetCurrentTransactionId(); xid = GetCurrentTransactionId();
/* /*
* Have the transaction access methods record the status of * Have the transaction access methods record the status of this
* this transaction id in the pg_log relation. We skip it * transaction id in the pg_log relation. We skip it if no one shared
* if no one shared buffer was changed by this transaction. * buffer was changed by this transaction.
*/ */
if (SharedBufferChanged && !TransactionIdDidCommit(xid)) if (SharedBufferChanged && !TransactionIdDidCommit(xid))
TransactionIdAbort(xid); TransactionIdAbort(xid);
...@@ -965,13 +964,13 @@ CommitTransaction() ...@@ -965,13 +964,13 @@ CommitTransaction()
RecordTransactionCommit(); RecordTransactionCommit();
/* /*
* Let others know about no transaction in progress by me. * Let others know about no transaction in progress by me. Note that
* Note that this must be done _before_ releasing locks we hold * this must be done _before_ releasing locks we hold and
* and SpinAcquire(SInvalLock) is required: UPDATE with xid 0 is * SpinAcquire(SInvalLock) is required: UPDATE with xid 0 is blocked
* blocked by xid 1' UPDATE, xid 1 is doing commit while xid 2 * by xid 1' UPDATE, xid 1 is doing commit while xid 2 gets snapshot -
* gets snapshot - if xid 2' GetSnapshotData sees xid 1 as running * if xid 2' GetSnapshotData sees xid 1 as running then it must see
* then it must see xid 0 as running as well or it will see two * xid 0 as running as well or it will see two tuple versions - one
* tuple versions - one deleted by xid 1 and one inserted by xid 0. * deleted by xid 1 and one inserted by xid 0.
*/ */
if (MyProc != (PROC *) NULL) if (MyProc != (PROC *) NULL)
{ {
...@@ -995,7 +994,7 @@ CommitTransaction() ...@@ -995,7 +994,7 @@ CommitTransaction()
* ---------------- * ----------------
*/ */
s->state = TRANS_DEFAULT; s->state = TRANS_DEFAULT;
SharedBufferChanged = false; /* safest place to do it */ SharedBufferChanged = false;/* safest place to do it */
} }
...@@ -1070,7 +1069,7 @@ AbortTransaction() ...@@ -1070,7 +1069,7 @@ AbortTransaction()
* ---------------- * ----------------
*/ */
s->state = TRANS_DEFAULT; s->state = TRANS_DEFAULT;
SharedBufferChanged = false; /* safest place to do it */ SharedBufferChanged = false;/* safest place to do it */
} }
/* -------------------------------- /* --------------------------------
......
This diff is collapsed.
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.80 2000/02/18 09:28:39 inoue Exp $ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.81 2000/04/12 17:14:54 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -107,7 +107,7 @@ static struct typinfo Procid[] = { ...@@ -107,7 +107,7 @@ static struct typinfo Procid[] = {
{"char", CHAROID, 0, 1, F_CHARIN, F_CHAROUT}, {"char", CHAROID, 0, 1, F_CHARIN, F_CHAROUT},
{"name", NAMEOID, 0, NAMEDATALEN, F_NAMEIN, F_NAMEOUT}, {"name", NAMEOID, 0, NAMEDATALEN, F_NAMEIN, F_NAMEOUT},
{"int2", INT2OID, 0, 2, F_INT2IN, F_INT2OUT}, {"int2", INT2OID, 0, 2, F_INT2IN, F_INT2OUT},
{"int2vector", INT2VECTOROID, 0, INDEX_MAX_KEYS*2, F_INT2VECTORIN, F_INT2VECTOROUT}, {"int2vector", INT2VECTOROID, 0, INDEX_MAX_KEYS * 2, F_INT2VECTORIN, F_INT2VECTOROUT},
{"int4", INT4OID, 0, 4, F_INT4IN, F_INT4OUT}, {"int4", INT4OID, 0, 4, F_INT4IN, F_INT4OUT},
{"regproc", REGPROCOID, 0, 4, F_REGPROCIN, F_REGPROCOUT}, {"regproc", REGPROCOID, 0, 4, F_REGPROCIN, F_REGPROCOUT},
{"text", TEXTOID, 0, -1, F_TEXTIN, F_TEXTOUT}, {"text", TEXTOID, 0, -1, F_TEXTIN, F_TEXTOUT},
...@@ -115,7 +115,7 @@ static struct typinfo Procid[] = { ...@@ -115,7 +115,7 @@ static struct typinfo Procid[] = {
{"tid", TIDOID, 0, 6, F_TIDIN, F_TIDOUT}, {"tid", TIDOID, 0, 6, F_TIDIN, F_TIDOUT},
{"xid", XIDOID, 0, 4, F_XIDIN, F_XIDOUT}, {"xid", XIDOID, 0, 4, F_XIDIN, F_XIDOUT},
{"cid", CIDOID, 0, 4, F_CIDIN, F_CIDOUT}, {"cid", CIDOID, 0, 4, F_CIDIN, F_CIDOUT},
{"oidvector", 30, 0, INDEX_MAX_KEYS*4, F_OIDVECTORIN, F_OIDVECTOROUT}, {"oidvector", 30, 0, INDEX_MAX_KEYS * 4, F_OIDVECTORIN, F_OIDVECTOROUT},
{"smgr", 210, 0, 2, F_SMGRIN, F_SMGROUT}, {"smgr", 210, 0, 2, F_SMGRIN, F_SMGROUT},
{"_int4", 1007, INT4OID, -1, F_ARRAY_IN, F_ARRAY_OUT}, {"_int4", 1007, INT4OID, -1, F_ARRAY_IN, F_ARRAY_OUT},
{"_aclitem", 1034, 1033, -1, F_ARRAY_IN, F_ARRAY_OUT} {"_aclitem", 1034, 1033, -1, F_ARRAY_IN, F_ARRAY_OUT}
...@@ -325,8 +325,8 @@ BootstrapMain(int argc, char *argv[]) ...@@ -325,8 +325,8 @@ BootstrapMain(int argc, char *argv[])
} }
/* /*
* Bootstrap under Postmaster means two things: * Bootstrap under Postmaster means two things: (xloginit) ?
* (xloginit) ? StartupXLOG : ShutdownXLOG * StartupXLOG : ShutdownXLOG
* *
* If !under Postmaster and xloginit then BootStrapXLOG. * If !under Postmaster and xloginit then BootStrapXLOG.
*/ */
...@@ -345,9 +345,7 @@ BootstrapMain(int argc, char *argv[]) ...@@ -345,9 +345,7 @@ BootstrapMain(int argc, char *argv[])
} }
if (!IsUnderPostmaster && xloginit) if (!IsUnderPostmaster && xloginit)
{
BootStrapXLOG(); BootStrapXLOG();
}
/* /*
* backend initialization * backend initialization
...@@ -1153,8 +1151,10 @@ build_indices() ...@@ -1153,8 +1151,10 @@ build_indices()
index_build(heap, ind, ILHead->il_natts, ILHead->il_attnos, index_build(heap, ind, ILHead->il_natts, ILHead->il_attnos,
ILHead->il_nparams, ILHead->il_params, ILHead->il_finfo, ILHead->il_nparams, ILHead->il_params, ILHead->il_finfo,
ILHead->il_predInfo); ILHead->il_predInfo);
/* In normal processing mode, index_build would close the heap
* and index, but in bootstrap mode it will not. /*
* In normal processing mode, index_build would close the heap and
* index, but in bootstrap mode it will not.
*/ */
/* /*
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.37 2000/01/26 05:56:09 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.38 2000/04/12 17:14:55 momjian Exp $
* *
* NOTES * NOTES
* See acl.h. * See acl.h.
...@@ -364,7 +364,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode) ...@@ -364,7 +364,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
*/ */
if (((mode & ACL_WR) || (mode & ACL_AP)) && if (((mode & ACL_WR) || (mode & ACL_AP)) &&
!allowSystemTableMods && IsSystemRelationName(relname) && !allowSystemTableMods && IsSystemRelationName(relname) &&
strncmp(relname,"pg_temp.", strlen("pg_temp.")) != 0 && strncmp(relname, "pg_temp.", strlen("pg_temp.")) != 0 &&
!((Form_pg_shadow) GETSTRUCT(tuple))->usecatupd) !((Form_pg_shadow) GETSTRUCT(tuple))->usecatupd)
{ {
elog(DEBUG, "pg_aclcheck: catalog update to \"%s\": permission denied", elog(DEBUG, "pg_aclcheck: catalog update to \"%s\": permission denied",
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.31 2000/04/09 04:43:15 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.32 2000/04/12 17:14:55 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -44,6 +44,7 @@ relpath(const char *relname) ...@@ -44,6 +44,7 @@ relpath(const char *relname)
snprintf(path, bufsize, "%s%c%s", DataDir, SEP_CHAR, relname); snprintf(path, bufsize, "%s%c%s", DataDir, SEP_CHAR, relname);
return path; return path;
} }
/* /*
* If it is in the current database, assume it is in current working * If it is in the current database, assume it is in current working
* directory. NB: this does not work during bootstrap! * directory. NB: this does not work during bootstrap!
......
This diff is collapsed.
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.107 2000/03/01 05:39:24 inoue Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.108 2000/04/12 17:14:55 momjian Exp $
* *
* *
* INTERFACE ROUTINES * INTERFACE ROUTINES
...@@ -77,16 +77,20 @@ static void DefaultBuild(Relation heapRelation, Relation indexRelation, ...@@ -77,16 +77,20 @@ static void DefaultBuild(Relation heapRelation, Relation indexRelation,
static Oid IndexGetRelation(Oid indexId); static Oid IndexGetRelation(Oid indexId);
static bool reindexing = false; static bool reindexing = false;
extern bool SetReindexProcessing(bool reindexmode) extern bool
SetReindexProcessing(bool reindexmode)
{ {
bool old = reindexing; bool old = reindexing;
reindexing = reindexmode; reindexing = reindexmode;
return old; return old;
} }
extern bool IsReindexProcessing(void) extern bool
IsReindexProcessing(void)
{ {
return reindexing; return reindexing;
} }
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* sysatts is a structure containing attribute tuple forms * sysatts is a structure containing attribute tuple forms
* for system attributes (numbered -1, -2, ...). This really * for system attributes (numbered -1, -2, ...). This really
...@@ -1075,9 +1079,9 @@ index_create(char *heapRelationName, ...@@ -1075,9 +1079,9 @@ index_create(char *heapRelationName,
* bootstrapping. Otherwise, we call the routine that constructs the * bootstrapping. Otherwise, we call the routine that constructs the
* index. * index.
* *
* In normal processing mode, the heap and index relations are closed * In normal processing mode, the heap and index relations are closed by
* by index_build() --- but we continue to hold the ShareLock on the * index_build() --- but we continue to hold the ShareLock on the heap
* heap that we acquired above, until end of transaction. * that we acquired above, until end of transaction.
*/ */
if (IsBootstrapProcessingMode()) if (IsBootstrapProcessingMode())
{ {
...@@ -1139,7 +1143,7 @@ index_drop(Oid indexId) ...@@ -1139,7 +1143,7 @@ index_drop(Oid indexId)
* they don't exist anyway. So, no warning in that case. * they don't exist anyway. So, no warning in that case.
* ---------------- * ----------------
*/ */
if (IsTransactionBlock() && ! userIndexRelation->rd_myxactonly) if (IsTransactionBlock() && !userIndexRelation->rd_myxactonly)
elog(NOTICE, "Caution: DROP INDEX cannot be rolled back, so don't abort now"); elog(NOTICE, "Caution: DROP INDEX cannot be rolled back, so don't abort now");
/* ---------------- /* ----------------
...@@ -1267,7 +1271,8 @@ FormIndexDatum(int numberOfAttributes, ...@@ -1267,7 +1271,8 @@ FormIndexDatum(int numberOfAttributes,
* -------------------------------------------- * --------------------------------------------
*/ */
static static
bool LockClassinfoForUpdate(Oid relid, HeapTuple rtup, Buffer *buffer, bool confirmCommitted) bool
LockClassinfoForUpdate(Oid relid, HeapTuple rtup, Buffer *buffer, bool confirmCommitted)
{ {
HeapTuple classTuple; HeapTuple classTuple;
Form_pg_class pgcform; Form_pg_class pgcform;
...@@ -1295,6 +1300,7 @@ bool LockClassinfoForUpdate(Oid relid, HeapTuple rtup, Buffer *buffer, bool conf ...@@ -1295,6 +1300,7 @@ bool LockClassinfoForUpdate(Oid relid, HeapTuple rtup, Buffer *buffer, bool conf
if (confirmCommitted) if (confirmCommitted)
{ {
HeapTupleHeader th = rtup->t_data; HeapTupleHeader th = rtup->t_data;
if (!(th->t_infomask & HEAP_XMIN_COMMITTED)) if (!(th->t_infomask & HEAP_XMIN_COMMITTED))
elog(ERROR, "The tuple isn't committed"); elog(ERROR, "The tuple isn't committed");
if (th->t_infomask & HEAP_XMAX_COMMITTED) if (th->t_infomask & HEAP_XMAX_COMMITTED)
...@@ -1309,7 +1315,8 @@ bool LockClassinfoForUpdate(Oid relid, HeapTuple rtup, Buffer *buffer, bool conf ...@@ -1309,7 +1315,8 @@ bool LockClassinfoForUpdate(Oid relid, HeapTuple rtup, Buffer *buffer, bool conf
* Indexes of the relation active ? * Indexes of the relation active ?
* --------------------------------------------- * ---------------------------------------------
*/ */
bool IndexesAreActive(Oid relid, bool confirmCommitted) bool
IndexesAreActive(Oid relid, bool confirmCommitted)
{ {
HeapTupleData tuple; HeapTupleData tuple;
Relation indexRelation; Relation indexRelation;
...@@ -1406,13 +1413,15 @@ setRelhasindexInplace(Oid relid, bool hasindex, bool immediate) ...@@ -1406,13 +1413,15 @@ setRelhasindexInplace(Oid relid, bool hasindex, bool immediate)
heap_close(pg_class, RowExclusiveLock); heap_close(pg_class, RowExclusiveLock);
elog(ERROR, "setRelhasindexInplace: cannot scan RELATION relation"); elog(ERROR, "setRelhasindexInplace: cannot scan RELATION relation");
} }
/* /*
* Confirm that target tuple is locked by this transaction * Confirm that target tuple is locked by this transaction in case of
* in case of immedaite updation. * immedaite updation.
*/ */
if (immediate) if (immediate)
{ {
HeapTupleHeader th = tuple->t_data; HeapTupleHeader th = tuple->t_data;
if (!(th->t_infomask & HEAP_XMIN_COMMITTED)) if (!(th->t_infomask & HEAP_XMIN_COMMITTED))
elog(ERROR, "Immediate hasindex updation can be done only for committed tuples %x", th->t_infomask); elog(ERROR, "Immediate hasindex updation can be done only for committed tuples %x", th->t_infomask);
if (th->t_infomask & HEAP_XMAX_INVALID) if (th->t_infomask & HEAP_XMAX_INVALID)
...@@ -1697,10 +1706,12 @@ DefaultBuild(Relation heapRelation, ...@@ -1697,10 +1706,12 @@ DefaultBuild(Relation heapRelation,
char *nullv; char *nullv;
long reltuples, long reltuples,
indtuples; indtuples;
#ifndef OMIT_PARTIAL_INDEX #ifndef OMIT_PARTIAL_INDEX
ExprContext *econtext; ExprContext *econtext;
TupleTable tupleTable; TupleTable tupleTable;
TupleTableSlot *slot; TupleTableSlot *slot;
#endif #endif
Node *predicate; Node *predicate;
Node *oldPred; Node *oldPred;
...@@ -1781,6 +1792,7 @@ DefaultBuild(Relation heapRelation, ...@@ -1781,6 +1792,7 @@ DefaultBuild(Relation heapRelation,
reltuples++; reltuples++;
#ifndef OMIT_PARTIAL_INDEX #ifndef OMIT_PARTIAL_INDEX
/* /*
* If oldPred != NULL, this is an EXTEND INDEX command, so skip * If oldPred != NULL, this is an EXTEND INDEX command, so skip
* this tuple if it was already in the existing partial index * this tuple if it was already in the existing partial index
...@@ -1804,7 +1816,7 @@ DefaultBuild(Relation heapRelation, ...@@ -1804,7 +1816,7 @@ DefaultBuild(Relation heapRelation,
{ {
/* SetSlotContents(slot, heapTuple); */ /* SetSlotContents(slot, heapTuple); */
slot->val = heapTuple; slot->val = heapTuple;
if (! ExecQual((List *) predicate, econtext, false)) if (!ExecQual((List *) predicate, econtext, false))
continue; continue;
} }
#endif /* OMIT_PARTIAL_INDEX */ #endif /* OMIT_PARTIAL_INDEX */
...@@ -1854,13 +1866,13 @@ DefaultBuild(Relation heapRelation, ...@@ -1854,13 +1866,13 @@ DefaultBuild(Relation heapRelation,
/* /*
* Since we just counted the tuples in the heap, we update its stats * Since we just counted the tuples in the heap, we update its stats
* in pg_class to guarantee that the planner takes advantage of the * in pg_class to guarantee that the planner takes advantage of the
* index we just created. But, only update statistics during * index we just created. But, only update statistics during normal
* normal index definitions, not for indices on system catalogs * index definitions, not for indices on system catalogs created
* created during bootstrap processing. We must close the relations * during bootstrap processing. We must close the relations before
* before updating statistics to guarantee that the relcache entries * updating statistics to guarantee that the relcache entries are
* are flushed when we increment the command counter in UpdateStats(). * flushed when we increment the command counter in UpdateStats(). But
* But we do not release any locks on the relations; those will be * we do not release any locks on the relations; those will be held
* held until end of transaction. * until end of transaction.
*/ */
if (IsNormalProcessingMode()) if (IsNormalProcessingMode())
{ {
...@@ -2049,17 +2061,25 @@ activate_index(Oid indexId, bool activate) ...@@ -2049,17 +2061,25 @@ activate_index(Oid indexId, bool activate)
bool bool
reindex_index(Oid indexId, bool force) reindex_index(Oid indexId, bool force)
{ {
Relation iRel, indexRelation, heapRelation; Relation iRel,
indexRelation,
heapRelation;
ScanKeyData entry; ScanKeyData entry;
HeapScanDesc scan; HeapScanDesc scan;
HeapTuple indexTuple, procTuple, classTuple; HeapTuple indexTuple,
procTuple,
classTuple;
Form_pg_index index; Form_pg_index index;
Oid heapId, procId, accessMethodId; Oid heapId,
procId,
accessMethodId;
Node *oldPred = NULL; Node *oldPred = NULL;
PredInfo *predInfo; PredInfo *predInfo;
AttrNumber *attributeNumberA; AttrNumber *attributeNumberA;
FuncIndexInfo fInfo, *funcInfo = NULL; FuncIndexInfo fInfo,
int i, numberOfAttributes; *funcInfo = NULL;
int i,
numberOfAttributes;
char *predString; char *predString;
bool old; bool old;
...@@ -2152,11 +2172,10 @@ reindex_index(Oid indexId, bool force) ...@@ -2152,11 +2172,10 @@ reindex_index(Oid indexId, bool force)
attributeNumberA, 0, NULL, funcInfo, predInfo); attributeNumberA, 0, NULL, funcInfo, predInfo);
/* /*
* index_build will close both the heap and index relations * index_build will close both the heap and index relations (but not
* (but not give up the locks we hold on them). That's fine * give up the locks we hold on them). That's fine for the index, but
* for the index, but we need to open the heap again. We need * we need to open the heap again. We need no new lock, since this
* no new lock, since this backend still has the exclusive lock * backend still has the exclusive lock grabbed by heap_truncate.
* grabbed by heap_truncate.
*/ */
iRel = index_open(indexId); iRel = index_open(indexId);
Assert(iRel != NULL); Assert(iRel != NULL);
...@@ -2182,21 +2201,18 @@ activate_indexes_of_a_table(Oid relid, bool activate) ...@@ -2182,21 +2201,18 @@ activate_indexes_of_a_table(Oid relid, bool activate)
if (!activate) if (!activate)
setRelhasindexInplace(relid, false, true); setRelhasindexInplace(relid, false, true);
else else
{
return false; return false;
} }
}
else else
{ {
if (activate) if (activate)
reindex_relation(relid, false); reindex_relation(relid, false);
else else
{
return false; return false;
} }
}
return true; return true;
} }
/* -------------------------------- /* --------------------------------
* reindex_relation - This routine is used to recreate indexes * reindex_relation - This routine is used to recreate indexes
* of a relation. * of a relation.
...@@ -2209,7 +2225,8 @@ reindex_relation(Oid relid, bool force) ...@@ -2209,7 +2225,8 @@ reindex_relation(Oid relid, bool force)
ScanKeyData entry; ScanKeyData entry;
HeapScanDesc scan; HeapScanDesc scan;
HeapTuple indexTuple; HeapTuple indexTuple;
bool old, reindexed; bool old,
reindexed;
old = SetReindexProcessing(true); old = SetReindexProcessing(true);
if (IndexesAreActive(relid, true)) if (IndexesAreActive(relid, true))
...@@ -2231,6 +2248,7 @@ reindex_relation(Oid relid, bool force) ...@@ -2231,6 +2248,7 @@ reindex_relation(Oid relid, bool force)
while (HeapTupleIsValid(indexTuple = heap_getnext(scan, 0))) while (HeapTupleIsValid(indexTuple = heap_getnext(scan, 0)))
{ {
Form_pg_index index = (Form_pg_index) GETSTRUCT(indexTuple); Form_pg_index index = (Form_pg_index) GETSTRUCT(indexTuple);
if (activate_index(index->indexrelid, true)) if (activate_index(index->indexrelid, true))
reindexed = true; reindexed = true;
else else
...@@ -2242,9 +2260,7 @@ reindex_relation(Oid relid, bool force) ...@@ -2242,9 +2260,7 @@ reindex_relation(Oid relid, bool force)
heap_endscan(scan); heap_endscan(scan);
heap_close(indexRelation, AccessShareLock); heap_close(indexRelation, AccessShareLock);
if (reindexed) if (reindexed)
{
setRelhasindexInplace(relid, true, false); setRelhasindexInplace(relid, true, false);
}
SetReindexProcessing(old); SetReindexProcessing(old);
return reindexed; return reindexed;
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.59 2000/02/18 09:28:41 inoue Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.60 2000/04/12 17:14:56 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -31,47 +31,47 @@ ...@@ -31,47 +31,47 @@
*/ */
char *Name_pg_aggregate_indices[Num_pg_aggregate_indices] = char *Name_pg_aggregate_indices[Num_pg_aggregate_indices] =
{AggregateNameTypeIndex}; {AggregateNameTypeIndex};
char *Name_pg_am_indices[Num_pg_am_indices] = char *Name_pg_am_indices[Num_pg_am_indices] =
{AmNameIndex}; {AmNameIndex};
char *Name_pg_amop_indices[Num_pg_amop_indices] = char *Name_pg_amop_indices[Num_pg_amop_indices] =
{AccessMethodOpidIndex, AccessMethodStrategyIndex}; {AccessMethodOpidIndex, AccessMethodStrategyIndex};
char *Name_pg_attr_indices[Num_pg_attr_indices] = char *Name_pg_attr_indices[Num_pg_attr_indices] =
{AttributeRelidNameIndex, AttributeRelidNumIndex}; {AttributeRelidNameIndex, AttributeRelidNumIndex};
char *Name_pg_attrdef_indices[Num_pg_attrdef_indices] = char *Name_pg_attrdef_indices[Num_pg_attrdef_indices] =
{AttrDefaultIndex}; {AttrDefaultIndex};
char *Name_pg_class_indices[Num_pg_class_indices] = char *Name_pg_class_indices[Num_pg_class_indices] =
{ClassNameIndex, ClassOidIndex}; {ClassNameIndex, ClassOidIndex};
char *Name_pg_group_indices[Num_pg_group_indices] = char *Name_pg_group_indices[Num_pg_group_indices] =
{GroupNameIndex, GroupSysidIndex}; {GroupNameIndex, GroupSysidIndex};
char *Name_pg_index_indices[Num_pg_index_indices] = char *Name_pg_index_indices[Num_pg_index_indices] =
{IndexRelidIndex}; {IndexRelidIndex};
char *Name_pg_inherits_indices[Num_pg_inherits_indices] = char *Name_pg_inherits_indices[Num_pg_inherits_indices] =
{InheritsRelidSeqnoIndex}; {InheritsRelidSeqnoIndex};
char *Name_pg_language_indices[Num_pg_language_indices] = char *Name_pg_language_indices[Num_pg_language_indices] =
{LanguageOidIndex, LanguageNameIndex}; {LanguageOidIndex, LanguageNameIndex};
char *Name_pg_listener_indices[Num_pg_listener_indices] = char *Name_pg_listener_indices[Num_pg_listener_indices] =
{ListenerRelnamePidIndex}; {ListenerRelnamePidIndex};
char *Name_pg_opclass_indices[Num_pg_opclass_indices] = char *Name_pg_opclass_indices[Num_pg_opclass_indices] =
{OpclassNameIndex, OpclassDeftypeIndex}; {OpclassNameIndex, OpclassDeftypeIndex};
char *Name_pg_operator_indices[Num_pg_operator_indices] = char *Name_pg_operator_indices[Num_pg_operator_indices] =
{OperatorOidIndex, OperatorNameIndex}; {OperatorOidIndex, OperatorNameIndex};
char *Name_pg_proc_indices[Num_pg_proc_indices] = char *Name_pg_proc_indices[Num_pg_proc_indices] =
{ProcedureOidIndex, ProcedureNameIndex}; {ProcedureOidIndex, ProcedureNameIndex};
char *Name_pg_relcheck_indices[Num_pg_relcheck_indices] = char *Name_pg_relcheck_indices[Num_pg_relcheck_indices] =
{RelCheckIndex}; {RelCheckIndex};
char *Name_pg_rewrite_indices[Num_pg_rewrite_indices] = char *Name_pg_rewrite_indices[Num_pg_rewrite_indices] =
{RewriteOidIndex, RewriteRulenameIndex}; {RewriteOidIndex, RewriteRulenameIndex};
char *Name_pg_shadow_indices[Num_pg_shadow_indices] = char *Name_pg_shadow_indices[Num_pg_shadow_indices] =
{ShadowNameIndex, ShadowSysidIndex}; {ShadowNameIndex, ShadowSysidIndex};
char *Name_pg_statistic_indices[Num_pg_statistic_indices] = char *Name_pg_statistic_indices[Num_pg_statistic_indices] =
{StatisticRelidAttnumIndex}; {StatisticRelidAttnumIndex};
char *Name_pg_trigger_indices[Num_pg_trigger_indices] = char *Name_pg_trigger_indices[Num_pg_trigger_indices] =
{TriggerRelidIndex, TriggerConstrNameIndex, TriggerConstrRelidIndex}; {TriggerRelidIndex, TriggerConstrNameIndex, TriggerConstrRelidIndex};
char *Name_pg_type_indices[Num_pg_type_indices] = char *Name_pg_type_indices[Num_pg_type_indices] =
{TypeNameIndex, TypeOidIndex}; {TypeNameIndex, TypeOidIndex};
char *Name_pg_description_indices[Num_pg_description_indices] = char *Name_pg_description_indices[Num_pg_description_indices] =
{DescriptionObjIndex}; {DescriptionObjIndex};
...@@ -1004,4 +1004,3 @@ TypeOidIndexScan(Relation heapRelation, Oid typeId) ...@@ -1004,4 +1004,3 @@ TypeOidIndexScan(Relation heapRelation, Oid typeId)
return tuple; return tuple;
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.30 2000/03/26 19:43:58 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.31 2000/04/12 17:14:56 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -200,8 +200,10 @@ AggregateCreate(char *aggName, ...@@ -200,8 +200,10 @@ AggregateCreate(char *aggName,
} }
else else
{ {
/* If no finalfn, aggregate result type is type of the sole
* state value (we already checked there is only one) /*
* If no finalfn, aggregate result type is type of the sole state
* value (we already checked there is only one)
*/ */
if (OidIsValid(xret1)) if (OidIsValid(xret1))
fret = xret1; fret = xret1;
...@@ -284,9 +286,9 @@ AggNameGetInitVal(char *aggName, Oid basetype, int xfuncno, bool *isNull) ...@@ -284,9 +286,9 @@ AggNameGetInitVal(char *aggName, Oid basetype, int xfuncno, bool *isNull)
Assert(xfuncno == 1 || xfuncno == 2); Assert(xfuncno == 1 || xfuncno == 2);
/* /*
* since we will have to use fastgetattr (in case one or both init vals * since we will have to use fastgetattr (in case one or both init
* are NULL), we will need to open the relation. Do that first to * vals are NULL), we will need to open the relation. Do that first
* ensure we don't get a stale tuple from the cache. * to ensure we don't get a stale tuple from the cache.
*/ */
aggRel = heap_openr(AggregateRelationName, AccessShareLock); aggRel = heap_openr(AggregateRelationName, AccessShareLock);
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.41 2000/04/04 21:44:37 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.42 2000/04/12 17:14:56 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.49 2000/01/26 05:56:11 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.50 2000/04/12 17:14:56 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -374,7 +374,7 @@ TypeCreate(char *typeName, ...@@ -374,7 +374,7 @@ TypeCreate(char *typeName,
values[i++] = (Datum) GetUserId(); /* 2 */ values[i++] = (Datum) GetUserId(); /* 2 */
values[i++] = (Datum) internalSize; /* 3 */ values[i++] = (Datum) internalSize; /* 3 */
values[i++] = (Datum) externalSize; /* 4 */ values[i++] = (Datum) externalSize; /* 4 */
values[i++] = (Datum) passedByValue;/* 5 */ values[i++] = (Datum) passedByValue; /* 5 */
values[i++] = (Datum) typeType; /* 6 */ values[i++] = (Datum) typeType; /* 6 */
values[i++] = (Datum) (bool) 1; /* 7 */ values[i++] = (Datum) (bool) 1; /* 7 */
values[i++] = (Datum) typDelim; /* 8 */ values[i++] = (Datum) typDelim; /* 8 */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/recipe.c,v 1.10 2000/01/26 05:56:17 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/recipe.c,v 1.11 2000/04/12 17:15:06 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -702,7 +702,7 @@ getParamTypes(TgElement * elem, Oid *typev) ...@@ -702,7 +702,7 @@ getParamTypes(TgElement * elem, Oid *typev)
if (parameterCount == FUNC_MAX_ARGS) if (parameterCount == FUNC_MAX_ARGS)
{ {
elog(ERROR, elog(ERROR,
"getParamTypes: Ingredients cannot take > %d arguments",FUNC_MAX_ARGS); "getParamTypes: Ingredients cannot take > %d arguments", FUNC_MAX_ARGS);
} }
t = elem->inTypes->val[j]; t = elem->inTypes->val[j];
if (strcmp(t, "opaque") == 0) if (strcmp(t, "opaque") == 0)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.58 2000/01/26 05:56:12 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.59 2000/04/12 17:14:57 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -155,12 +155,13 @@ Async_Notify(char *relname) ...@@ -155,12 +155,13 @@ Async_Notify(char *relname)
/* no point in making duplicate entries in the list ... */ /* no point in making duplicate entries in the list ... */
if (!AsyncExistsPendingNotify(relname)) if (!AsyncExistsPendingNotify(relname))
{ {
/* /*
* We allocate list memory from the global malloc pool to ensure * We allocate list memory from the global malloc pool to ensure
* that it will live until we want to use it. This is probably not * that it will live until we want to use it. This is probably
* necessary any longer, since we will use it before the end of the * not necessary any longer, since we will use it before the end
* transaction. DLList only knows how to use malloc() anyway, but we * of the transaction. DLList only knows how to use malloc()
* could probably palloc() the strings... * anyway, but we could probably palloc() the strings...
*/ */
notifyName = strdup(relname); notifyName = strdup(relname);
DLAddHead(pendingNotifies, DLNewElem(notifyName)); DLAddHead(pendingNotifies, DLNewElem(notifyName));
...@@ -466,6 +467,7 @@ AtCommit_Notify() ...@@ -466,6 +467,7 @@ AtCommit_Notify()
if (listenerPID == MyProcPid) if (listenerPID == MyProcPid)
{ {
/* /*
* Self-notify: no need to bother with table update. * Self-notify: no need to bother with table update.
* Indeed, we *must not* clear the notification field in * Indeed, we *must not* clear the notification field in
...@@ -491,6 +493,7 @@ AtCommit_Notify() ...@@ -491,6 +493,7 @@ AtCommit_Notify()
*/ */
if (kill(listenerPID, SIGUSR2) < 0) if (kill(listenerPID, SIGUSR2) < 0)
{ {
/* /*
* Get rid of pg_listener entry if it refers to a PID * Get rid of pg_listener entry if it refers to a PID
* that no longer exists. Presumably, that backend * that no longer exists. Presumably, that backend
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.50 2000/01/26 05:56:13 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.51 2000/04/12 17:14:57 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -104,8 +104,8 @@ cluster(char *oldrelname, char *oldindexname) ...@@ -104,8 +104,8 @@ cluster(char *oldrelname, char *oldindexname)
* Like vacuum, cluster spans transactions, so I'm going to handle it * Like vacuum, cluster spans transactions, so I'm going to handle it
* in the same way: commit and restart transactions where needed. * in the same way: commit and restart transactions where needed.
* *
* We grab exclusive access to the target rel and index for the * We grab exclusive access to the target rel and index for the duration
* duration of the initial transaction. * of the initial transaction.
*/ */
OldHeap = heap_openr(oldrelname, AccessExclusiveLock); OldHeap = heap_openr(oldrelname, AccessExclusiveLock);
...@@ -115,7 +115,7 @@ cluster(char *oldrelname, char *oldindexname) ...@@ -115,7 +115,7 @@ cluster(char *oldrelname, char *oldindexname)
LockRelation(OldIndex, AccessExclusiveLock); LockRelation(OldIndex, AccessExclusiveLock);
OIDOldIndex = RelationGetRelid(OldIndex); OIDOldIndex = RelationGetRelid(OldIndex);
heap_close(OldHeap, NoLock); /* do NOT give up the locks */ heap_close(OldHeap, NoLock);/* do NOT give up the locks */
index_close(OldIndex); index_close(OldIndex);
/* /*
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994-5, Regents of the University of California * Portions Copyright (c) 1994-5, Regents of the University of California
* *
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.55 2000/03/14 23:06:12 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.56 2000/04/12 17:14:58 momjian Exp $
* *
*/ */
...@@ -209,7 +209,7 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es) ...@@ -209,7 +209,7 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
switch (nodeTag(plan)) switch (nodeTag(plan))
{ {
case T_IndexScan: case T_IndexScan:
if (ScanDirectionIsBackward(((IndexScan *)plan)->indxorderdir)) if (ScanDirectionIsBackward(((IndexScan *) plan)->indxorderdir))
appendStringInfo(str, " Backward"); appendStringInfo(str, " Backward");
appendStringInfo(str, " using "); appendStringInfo(str, " using ");
i = 0; i = 0;
...@@ -246,9 +246,9 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es) ...@@ -246,9 +246,9 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
int firstEntry = true; int firstEntry = true;
appendStringInfo(str, " ("); appendStringInfo(str, " (");
foreach (c, rte->ref->attrs) foreach(c, rte->ref->attrs)
{ {
if (! firstEntry) if (!firstEntry)
{ {
appendStringInfo(str, ", "); appendStringInfo(str, ", ");
firstEntry = false; firstEntry = false;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment