Commit 7cf952e7 authored by Bruce Momjian's avatar Bruce Momjian

Fix comments that were mis-wrapped, for Tom Lane.

parent 4e911c84
...@@ -399,19 +399,29 @@ check_foreign_key(PG_FUNCTION_ARGS) ...@@ -399,19 +399,29 @@ check_foreign_key(PG_FUNCTION_ARGS)
{ {
relname = args2[0]; relname = args2[0];
/* /*---------
* For 'R'estrict action we construct SELECT query - SELECT 1 * For 'R'estrict action we construct SELECT query:
* FROM _referencing_relation_ WHERE Fkey1 = $1 [AND Fkey2 = *
* $2 [...]] - to check is tuple referenced or not. * SELECT 1
* FROM _referencing_relation_
* WHERE Fkey1 = $1 [AND Fkey2 = $2 [...]]
*
* to check is tuple referenced or not.
*---------
*/ */
if (action == 'r') if (action == 'r')
sprintf(sql, "select 1 from %s where ", relname); sprintf(sql, "select 1 from %s where ", relname);
/* /*---------
* For 'C'ascade action we construct DELETE query - DELETE * For 'C'ascade action we construct DELETE query
* FROM _referencing_relation_ WHERE Fkey1 = $1 [AND Fkey2 = *
* $2 [...]] - to delete all referencing tuples. * DELETE
* FROM _referencing_relation_
* WHERE Fkey1 = $1 [AND Fkey2 = $2 [...]]
*
* to delete all referencing tuples.
*---------
*/ */
/* /*
......
...@@ -143,9 +143,10 @@ gistrescan(PG_FUNCTION_ARGS) ...@@ -143,9 +143,10 @@ gistrescan(PG_FUNCTION_ARGS)
for (i = 0; i < s->numberOfKeys; i++) for (i = 0; i < s->numberOfKeys; i++)
{ {
/* /*----------
* s->keyData[i].sk_procedure = * s->keyData[i].sk_procedure =
* index_getprocid(s->relation, 1, GIST_CONSISTENT_PROC); * index_getprocid(s->relation, 1, GIST_CONSISTENT_PROC);
*----------
*/ */
s->keyData[i].sk_procedure s->keyData[i].sk_procedure
= RelationGetGISTStrategy(s->relation, s->keyData[i].sk_attno, = RelationGetGISTStrategy(s->relation, s->keyData[i].sk_attno,
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.25 2001/01/24 19:42:47 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.26 2001/03/23 04:49:51 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -334,9 +334,11 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf) ...@@ -334,9 +334,11 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf)
while (offnum > maxoff) while (offnum > maxoff)
{ {
/* /*--------
* either this page is empty (maxoff == * either this page is empty
* InvalidOffsetNumber) or we ran off the end. * (maxoff == InvalidOffsetNumber)
* or we ran off the end.
*--------
*/ */
_hash_readnext(rel, &buf, &page, &opaque); _hash_readnext(rel, &buf, &page, &opaque);
if (BufferIsInvalid(buf)) if (BufferIsInvalid(buf))
...@@ -382,9 +384,11 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf) ...@@ -382,9 +384,11 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf)
while (offnum < FirstOffsetNumber) while (offnum < FirstOffsetNumber)
{ {
/* /*---------
* either this page is empty (offnum == * either this page is empty
* InvalidOffsetNumber) or we ran off the end. * (offnum == InvalidOffsetNumber)
* or we ran off the end.
*---------
*/ */
_hash_readprev(rel, &buf, &page, &opaque); _hash_readprev(rel, &buf, &page, &opaque);
if (BufferIsInvalid(buf)) if (BufferIsInvalid(buf))
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/heap/tuptoaster.c,v 1.19 2001/03/22 06:16:07 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/heap/tuptoaster.c,v 1.20 2001/03/23 04:49:51 momjian Exp $
* *
* *
* INTERFACE ROUTINES * INTERFACE ROUTINES
...@@ -458,9 +458,10 @@ toast_insert_or_update(Relation rel, HeapTuple newtup, HeapTuple oldtup) ...@@ -458,9 +458,10 @@ toast_insert_or_update(Relation rel, HeapTuple newtup, HeapTuple oldtup)
int32 biggest_size = MAXALIGN(sizeof(varattrib)); int32 biggest_size = MAXALIGN(sizeof(varattrib));
Datum old_value; Datum old_value;
/* /*------
* Search for the biggest yet inlined attribute with attstorage = * Search for the biggest yet inlined attribute with
* 'x' or 'e' * attstorage equals 'x' or 'e'
*------
*/ */
for (i = 0; i < numAttrs; i++) for (i = 0; i < numAttrs; i++)
{ {
...@@ -572,9 +573,10 @@ toast_insert_or_update(Relation rel, HeapTuple newtup, HeapTuple oldtup) ...@@ -572,9 +573,10 @@ toast_insert_or_update(Relation rel, HeapTuple newtup, HeapTuple oldtup)
int32 biggest_size = MAXALIGN(sizeof(varattrib)); int32 biggest_size = MAXALIGN(sizeof(varattrib));
Datum old_value; Datum old_value;
/* /*--------
* Search for the biggest yet inlined attribute with attstorage = * Search for the biggest yet inlined attribute with
* 'm' * attstorage = 'm'
*--------
*/ */
for (i = 0; i < numAttrs; i++) for (i = 0; i < numAttrs; i++)
{ {
......
...@@ -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/access/nbtree/nbtsearch.c,v 1.65 2001/03/22 06:16:07 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.66 2001/03/23 04:49:51 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -584,8 +584,10 @@ _bt_first(IndexScanDesc scan, ScanDirection dir) ...@@ -584,8 +584,10 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
/* /*
* At this point we are positioned at the first item >= scan key, or * At this point we are positioned at the first item >= scan key, or
* possibly at the end of a page on which all the existing items are < * possibly at the end of a page on which all the existing items are
* scan key and we know that everything on later pages is >= scan key. * greater than the scan key and we know that everything on later pages
* is less than or equal to scan key.
*
* We could step forward in the latter case, but that'd be a waste of * We could step forward in the latter case, but that'd be a waste of
* time if we want to scan backwards. So, it's now time to examine * time if we want to scan backwards. So, it's now time to examine
* the scan strategy to find the exact place to start the scan. * the scan strategy to find the exact place to start the scan.
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.43 2001/03/22 03:59:15 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.44 2001/03/23 04:49:52 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -412,8 +412,8 @@ _bt_orderkeys(Relation relation, BTScanOpaque so) ...@@ -412,8 +412,8 @@ _bt_orderkeys(Relation relation, BTScanOpaque so)
if (DatumGetBool(test)) if (DatumGetBool(test))
xform[j].sk_argument = cur->sk_argument; xform[j].sk_argument = cur->sk_argument;
else if (j == (BTEqualStrategyNumber - 1)) else if (j == (BTEqualStrategyNumber - 1))
so->qual_ok = false; /* key == a && key == b, but a != so->qual_ok = false;
* b */ /* key == a && key == b, but a != b */
} }
else else
{ {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* doesn't work! - jolly 8/19/95 * doesn't work! - jolly 8/19/95
* *
* *
* $Id: version.c,v 1.25 2001/01/24 19:42:53 momjian Exp $ * $Id: version.c,v 1.26 2001/03/23 04:49:52 momjian Exp $
* *
* NOTES * NOTES
* At the point the version is defined, 2 physical relations are created * At the point the version is defined, 2 physical relations are created
...@@ -77,9 +77,12 @@ static void ...@@ -77,9 +77,12 @@ static void
eval_as_new_xact(char *query) eval_as_new_xact(char *query)
{ {
/* /*------
* WARNING! do not uncomment the following lines WARNING! * WARNING! do not uncomment the following lines WARNING!
* CommitTransactionCommand(); StartTransactionCommand(); *
* CommitTransactionCommand();
* StartTransactionCommand();
*------
*/ */
CommandCounterIncrement(); CommandCounterIncrement();
pg_exec_query(query); pg_exec_query(query);
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.124 2001/03/22 06:16:11 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.125 2001/03/23 04:49:52 momjian Exp $
* *
* NOTES * NOTES
* The PerformAddAttribute() code, like most of the relation * The PerformAddAttribute() code, like most of the relation
...@@ -1034,11 +1034,13 @@ AlterTableDropColumn(const char *relationName, ...@@ -1034,11 +1034,13 @@ AlterTableDropColumn(const char *relationName,
ScanKeyEntryInitialize(&scankeys[0], 0x0, Anum_pg_attrdef_adrelid, ScanKeyEntryInitialize(&scankeys[0], 0x0, Anum_pg_attrdef_adrelid,
F_OIDEQ, ObjectIdGetDatum(myrelid)); F_OIDEQ, ObjectIdGetDatum(myrelid));
/* /*--------
* Oops pg_attrdef doesn't have (adrelid,adnum) index * Oops pg_attrdef doesn't have (adrelid,adnum) index
* ScanKeyEntryInitialize(&scankeys[1], 0x0, Anum_pg_attrdef_adnum, *
* F_INT2EQ, Int16GetDatum(attnum)); sysscan = * ScanKeyEntryInitialize(&scankeys[1], 0x0, Anum_pg_attrdef_adnum,
* systable_beginscan(adrel, AttrDefaultIndex, 2, scankeys); * F_INT2EQ, Int16GetDatum(attnum));
* sysscan = systable_beginscan(adrel, AttrDefaultIndex, 2, scankeys);
*--------
*/ */
sysscan = systable_beginscan(adrel, AttrDefaultIndex, 1, scankeys); sysscan = systable_beginscan(adrel, AttrDefaultIndex, 1, scankeys);
while (HeapTupleIsValid(tup = systable_getnext(sysscan))) while (HeapTupleIsValid(tup = systable_getnext(sysscan)))
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.84 2001/03/22 03:59:26 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.85 2001/03/23 04:49:53 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1499,8 +1499,9 @@ ExecTargetList(List *targetlist, ...@@ -1499,8 +1499,9 @@ ExecTargetList(List *targetlist,
* and another array that holds the isDone status for each targetlist * and another array that holds the isDone status for each targetlist
* item. The isDone status is needed so that we can iterate, * item. The isDone status is needed so that we can iterate,
* generating multiple tuples, when one or more tlist items return * generating multiple tuples, when one or more tlist items return
* sets. (We expect the caller to call us again if we return *isDone * sets. (We expect the caller to call us again if we return:
* = ExprMultipleResult.) *
* isDone = ExprMultipleResult.)
*/ */
if (nodomains > NPREALLOCDOMAINS) if (nodomains > NPREALLOCDOMAINS)
{ {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeLimit.c,v 1.5 2001/03/22 06:16:13 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeLimit.c,v 1.6 2001/03/23 04:49:53 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -79,8 +79,8 @@ ExecLimit(Limit *node) ...@@ -79,8 +79,8 @@ ExecLimit(Limit *node)
* tuple in the offset region before we can return NULL. * tuple in the offset region before we can return NULL.
* Otherwise we won't be correctly aligned to start going forward * Otherwise we won't be correctly aligned to start going forward
* again. So, although you might think we can quit when position * again. So, although you might think we can quit when position
* = offset + 1, we have to fetch a subplan tuple first, and then * equals offset + 1, we have to fetch a subplan tuple first, and
* exit when position = offset. * then exit when position = offset.
*/ */
if (ScanDirectionIsForward(direction)) if (ScanDirectionIsForward(direction))
{ {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.44 2001/03/22 06:16:13 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.45 2001/03/23 04:49:53 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -240,10 +240,11 @@ MergeCompare(List *eqQual, List *compareQual, ExprContext *econtext) ...@@ -240,10 +240,11 @@ MergeCompare(List *eqQual, List *compareQual, ExprContext *econtext)
break; break;
} }
/* /*-----------
* ok, the compare clause failed so we test if the keys are * ok, the compare clause failed so we test if the keys are
* equal... if key1 != key2, we return false. otherwise key1 = * equal... if key1 != key2, we return false. otherwise
* key2 so we move on to the next pair of keys. * key1 = key2 so we move on to the next pair of keys.
*-----------
*/ */
const_value = ExecEvalExpr((Node *) lfirst(eqclause), const_value = ExecEvalExpr((Node *) lfirst(eqclause),
econtext, econtext,
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.42 2001/03/22 03:59:34 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.43 2001/03/23 04:49:53 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -297,9 +297,11 @@ addRangeClause(RangeQueryClause **rqlist, Node *clause, ...@@ -297,9 +297,11 @@ addRangeClause(RangeQueryClause **rqlist, Node *clause,
else else
{ {
/* /*------
* We have found two similar clauses, such as x < y AND x * We have found two similar clauses, such as
* < z. Keep only the more restrictive one. * x < y AND x < z.
* Keep only the more restrictive one.
*------
*/ */
if (rqelem->lobound > s2) if (rqelem->lobound > s2)
rqelem->lobound = s2; rqelem->lobound = s2;
...@@ -315,9 +317,11 @@ addRangeClause(RangeQueryClause **rqlist, Node *clause, ...@@ -315,9 +317,11 @@ addRangeClause(RangeQueryClause **rqlist, Node *clause,
else else
{ {
/* /*------
* We have found two similar clauses, such as x > y AND x * We have found two similar clauses, such as
* > z. Keep only the more restrictive one. * x > y AND x > z.
* Keep only the more restrictive one.
*------
*/ */
if (rqelem->hibound > s2) if (rqelem->hibound > s2)
rqelem->hibound = s2; rqelem->hibound = s2;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.103 2001/03/22 03:59:35 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.104 2001/03/23 04:49:53 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1986,9 +1986,10 @@ prefix_quals(Var *leftop, Oid expr_op, ...@@ -1986,9 +1986,10 @@ prefix_quals(Var *leftop, Oid expr_op,
expr = make_opclause(op, leftop, (Var *) con); expr = make_opclause(op, leftop, (Var *) con);
result = makeList1(expr); result = makeList1(expr);
/* /*-------
* If we can create a string larger than the prefix, we can say "x < * If we can create a string larger than the prefix, we can say
* greaterstr". * "x < greaterstr".
*-------
*/ */
greaterstr = make_greater_string(prefix, datatype); greaterstr = make_greater_string(prefix, datatype);
if (greaterstr) if (greaterstr)
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.60 2001/03/22 06:16:16 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.61 2001/03/23 04:49:54 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -130,10 +130,14 @@ ValidateRule(int event_type, ...@@ -130,10 +130,14 @@ ValidateRule(int event_type,
#ifdef NOT_USED #ifdef NOT_USED
/* /*---------
* on retrieve to class.attribute do instead nothing is converted to * on retrieve to class.attribute do instead nothing is converted to
* 'on retrieve to class.attribute do instead retrieve (attribute = * 'on retrieve to class.attribute do instead:
* NULL)' --- this is also a terrible hack that works well -- glass *
* retrieve (attribute = NULL)'
*
* this is also a terrible hack that works well -- glass
*---------
*/ */
if (is_instead && !*action && eslot_string && event_type == CMD_SELECT) if (is_instead && !*action && eslot_string && event_type == CMD_SELECT)
{ {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.65 2001/03/22 06:16:16 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.66 2001/03/23 04:49:54 momjian Exp $
* *
* NOTES * NOTES
* *
...@@ -404,7 +404,7 @@ IpcSemaphoreLock(IpcSemaphoreId semId, int sem, bool interruptOK) ...@@ -404,7 +404,7 @@ IpcSemaphoreLock(IpcSemaphoreId semId, int sem, bool interruptOK)
* and entering the semop() call. If a cancel/die interrupt occurs in * and entering the semop() call. If a cancel/die interrupt occurs in
* that window, we would fail to notice it until after we acquire the * that window, we would fail to notice it until after we acquire the
* lock (or get another interrupt to escape the semop()). We can * lock (or get another interrupt to escape the semop()). We can
* avoid this problem by temporarily setting ImmediateInterruptOK = * avoid this problem by temporarily setting ImmediateInterruptOK to
* true before we do CHECK_FOR_INTERRUPTS; then, a die() interrupt in * true before we do CHECK_FOR_INTERRUPTS; then, a die() interrupt in
* this interval will execute directly. However, there is a huge * this interval will execute directly. However, there is a huge
* pitfall: there is another window of a few instructions after the * pitfall: there is another window of a few instructions after the
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.28 2001/03/22 03:59:45 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.29 2001/03/23 04:49:54 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -319,11 +319,13 @@ GetSnapshotData(bool serializable) ...@@ -319,11 +319,13 @@ GetSnapshotData(bool serializable)
xid < FirstTransactionId || xid >= snapshot->xmax) xid < FirstTransactionId || xid >= snapshot->xmax)
{ {
/* /*--------
* Seems that there is no sense to store xid >= * Seems that there is no sense to store
* snapshot->xmax (what we got from ReadNewTransactionId * xid >= snapshot->xmax
* above) in snapshot->xip - we just assume that all xacts * (what we got from ReadNewTransactionId above)
* in snapshot->xip. We just assume that all xacts
* with such xid-s are running and may be ignored. * with such xid-s are running and may be ignored.
*--------
*/ */
continue; continue;
} }
......
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
* formatting.c * formatting.c
* *
* $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.35 2001/03/22 06:16:17 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.36 2001/03/23 04:49:54 momjian Exp $
* *
* *
* Portions Copyright (c) 1999-2000, PostgreSQL Global Development Group * Portions Copyright (c) 1999-2000, PostgreSQL Global Development Group
...@@ -2846,9 +2846,11 @@ to_timestamp(PG_FUNCTION_ARGS) ...@@ -2846,9 +2846,11 @@ to_timestamp(PG_FUNCTION_ARGS)
else if (tmfc->yy) else if (tmfc->yy)
{ {
/* /*---------
* 2-digit year: '00' ... '69' = 2000 ... 2069 '70' ... '99' = * 2-digit year:
* 1970 ... 1999 * '00' ... '69' = 2000 ... 2069
* '70' ... '99' = 1970 ... 1999
*---------
*/ */
tm->tm_year = tmfc->yy; tm->tm_year = tmfc->yy;
...@@ -2860,9 +2862,11 @@ to_timestamp(PG_FUNCTION_ARGS) ...@@ -2860,9 +2862,11 @@ to_timestamp(PG_FUNCTION_ARGS)
else if (tmfc->yyy) else if (tmfc->yyy)
{ {
/* /*---------
* 3-digit year: '100' ... '999' = 1100 ... 1999 '000' ... '099' = * 3-digit year:
* 2000 ... 2099 * '100' ... '999' = 1100 ... 1999
* '000' ... '099' = 2000 ... 2099
*---------
*/ */
tm->tm_year = tmfc->yyy; tm->tm_year = tmfc->yyy;
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.86 2001/03/22 03:59:54 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.87 2001/03/23 04:49:54 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1642,9 +1642,10 @@ prefix_selectivity(char *prefix, ...@@ -1642,9 +1642,10 @@ prefix_selectivity(char *prefix,
Int32GetDatum(SEL_CONSTANT | SEL_RIGHT))); Int32GetDatum(SEL_CONSTANT | SEL_RIGHT)));
pfree(DatumGetPointer(prefixcon)); pfree(DatumGetPointer(prefixcon));
/* /*-------
* If we can create a string larger than the prefix, say "x < * If we can create a string larger than the prefix, say
* greaterstr". * "x < greaterstr".
*-------
*/ */
greaterstr = make_greater_string(prefix, datatype); greaterstr = make_greater_string(prefix, datatype);
if (greaterstr) if (greaterstr)
......
...@@ -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/utils/cache/lsyscache.c,v 1.51 2001/03/22 03:59:57 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.52 2001/03/23 04:49:55 momjian Exp $
* *
* NOTES * NOTES
* Eventually, the index information should go through here, too. * Eventually, the index information should go through here, too.
...@@ -272,7 +272,7 @@ get_attdispersion(Oid relid, AttrNumber attnum, double min_estimate) ...@@ -272,7 +272,7 @@ get_attdispersion(Oid relid, AttrNumber attnum, double min_estimate)
/* /*
* VACUUM ANALYZE has not been run for this table. Produce an estimate * VACUUM ANALYZE has not been run for this table. Produce an estimate
* = 1/numtuples. This may produce unreasonably small estimates for * of 1/numtuples. This may produce unreasonably small estimates for
* large tables, so limit the estimate to no less than min_estimate. * large tables, so limit the estimate to no less than min_estimate.
*/ */
dispersion = 1.0 / (double) ntuples; dispersion = 1.0 / (double) ntuples;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.129 2001/03/22 03:59:57 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.130 2001/03/23 04:49:55 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -2833,11 +2833,14 @@ write_irels(void) ...@@ -2833,11 +2833,14 @@ write_irels(void)
* the descriptors, nail them into cache so we never lose them. * the descriptors, nail them into cache so we never lose them.
*/ */
/* /*---------
* Removed the following ProcessingMode change -- inoue At this point * Removed the following ProcessingMode change -- inoue
* 1) Catalog Cache isn't initialized 2) Relation Cache for the * At this point
* following critical indexes aren't built oldmode = * 1) Catalog Cache isn't initialized
* GetProcessingMode(); SetProcessingMode(BootstrapProcessing); * 2) Relation Cache for the following critical indexes aren't built
* oldmode = GetProcessingMode();
* SetProcessingMode(BootstrapProcessing);
*---------
*/ */
bi.infotype = INFO_RELNAME; bi.infotype = INFO_RELNAME;
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,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/utils/sort/tuplesort.c,v 1.14 2001/03/22 04:00:09 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/sort/tuplesort.c,v 1.15 2001/03/23 04:49:55 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -129,8 +129,10 @@ struct Tuplesortstate ...@@ -129,8 +129,10 @@ struct Tuplesortstate
* kind of tuple we are sorting from the routines that don't need to * kind of tuple we are sorting from the routines that don't need to
* know it. They are set up by the tuplesort_begin_xxx routines. * know it. They are set up by the tuplesort_begin_xxx routines.
* *
* Function to compare two tuples; result is per qsort() convention, ie, * Function to compare two tuples; result is per qsort() convention,
* <0, 0, >0 according as a<b, a=b, a>b. * ie:
*
* <0, 0, >0 according as a<b, a=b, a>b.
*/ */
int (*comparetup) (Tuplesortstate *state, const void *a, const void *b); int (*comparetup) (Tuplesortstate *state, const void *a, const void *b);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Implements the basic DB functions used by the archiver. * Implements the basic DB functions used by the archiver.
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.16 2001/03/22 04:00:12 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.17 2001/03/23 04:49:55 momjian Exp $
* *
* NOTES * NOTES
* *
...@@ -473,9 +473,10 @@ ExecuteSqlCommandBuf(ArchiveHandle *AH, void *qryv, int bufLen) ...@@ -473,9 +473,10 @@ ExecuteSqlCommandBuf(ArchiveHandle *AH, void *qryv, int bufLen)
qry += loc + 1; qry += loc + 1;
isEnd = (strcmp(AH->pgCopyBuf->data, "\\.\n") == 0); isEnd = (strcmp(AH->pgCopyBuf->data, "\\.\n") == 0);
/* /*---------
* fprintf(stderr, "Sending '%s' via COPY (at end = * fprintf(stderr, "Sending '%s' via
* %d)\n\n", AH->pgCopyBuf->data, isEnd); * COPY (at end = %d)\n\n", AH->pgCopyBuf->data, isEnd);
*---------
*/ */
if (PQputline(AH->connection, AH->pgCopyBuf->data) != 0) if (PQputline(AH->connection, AH->pgCopyBuf->data) != 0)
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.196 2001/03/22 04:00:14 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.197 2001/03/23 04:49:55 momjian Exp $
* *
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
* *
...@@ -4405,8 +4405,10 @@ dumpSequence(Archive *fout, TableInfo tbinfo, const bool schemaOnly, const bool ...@@ -4405,8 +4405,10 @@ dumpSequence(Archive *fout, TableInfo tbinfo, const bool schemaOnly, const bool
/* /*
* The logic we use for restoring sequences is as follows: - Add a * The logic we use for restoring sequences is as follows: - Add a
* basic CREATE SEQUENCE statement (use last_val for start if called * basic CREATE SEQUENCE statement (use last_val for start if called
* == 'f', else use min_val for start_val). - Add a 'SETVAL(seq, * with 'f', else use min_val for start_val).
* last_val, iscalled)' at restore-time iff we load data *
* Add a 'SETVAL(seq, last_val, iscalled)' at restore-time iff
* we load data
*/ */
if (!dataOnly) if (!dataOnly)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_dump.h,v 1.59 2001/03/22 04:00:15 momjian Exp $ * $Id: pg_dump.h,v 1.60 2001/03/23 04:49:56 momjian Exp $
* *
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2 * Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
* *
...@@ -158,8 +158,12 @@ typedef struct _oprInfo ...@@ -158,8 +158,12 @@ typedef struct _oprInfo
{ {
char *oid; char *oid;
char *oprname; char *oprname;
char *oprkind; /* "b" = binary, "l" = left unary, "r" = char *oprkind; /*----------
* right unary */ * b = binary,
* l = left unary
* r = right unary
*----------
*/
char *oprcode; /* operator function name */ char *oprcode; /* operator function name */
char *oprleft; /* left operand type */ char *oprleft; /* left operand type */
char *oprright; /* right operand type */ char *oprright; /* right operand type */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_type.h,v 1.102 2001/03/22 04:00:41 momjian Exp $ * $Id: pg_type.h,v 1.103 2001/03/23 04:49:56 momjian Exp $
* *
* NOTES * NOTES
* the genbki.sh script reads this file and generates .bki * the genbki.sh script reads this file and generates .bki
...@@ -77,8 +77,9 @@ CATALOG(pg_type) BOOTSTRAP ...@@ -77,8 +77,9 @@ CATALOG(pg_type) BOOTSTRAP
* be a "real" array type; some ordinary fixed-length types can also * be a "real" array type; some ordinary fixed-length types can also
* be subscripted (e.g., oidvector). Variable-length types can *not* * be subscripted (e.g., oidvector). Variable-length types can *not*
* be turned into pseudo-arrays like that. Hence, the way to determine * be turned into pseudo-arrays like that. Hence, the way to determine
* whether a type is a "true" array type is typelem != 0 and typlen < * whether a type is a "true" array type is if:
* 0. *
* typelem != 0 and typlen < 0.
*/ */
Oid typelem; Oid typelem;
regproc typinput; regproc typinput;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: parsenodes.h,v 1.125 2001/03/22 04:00:51 momjian Exp $ * $Id: parsenodes.h,v 1.126 2001/03/23 04:49:56 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -116,10 +116,16 @@ typedef enum InhOption ...@@ -116,10 +116,16 @@ typedef enum InhOption
typedef struct AlterTableStmt typedef struct AlterTableStmt
{ {
NodeTag type; NodeTag type;
char subtype; /* A = add column, T = alter column, D = char subtype; /*------------
* drop column, C = add constraint, X = * A = add column
* drop constraint, E = add toast table, U * T = alter column
* = change owner */ * D = drop column
* C = add constraint
* X = drop constraint
* E = add toast table,
* U = change owner
*------------
*/
char *relname; /* table to work on */ char *relname; /* table to work on */
InhOption inhOpt; /* recursively act on children? */ InhOption inhOpt; /* recursively act on children? */
char *name; /* column or constraint name to act on, or char *name; /* column or constraint name to act on, or
......
...@@ -307,10 +307,11 @@ ECPGconnect(int lineno, const char *name, const char *user, const char *passwd, ...@@ -307,10 +307,11 @@ ECPGconnect(int lineno, const char *name, const char *user, const char *passwd,
if (strncmp(dbname + offset, "postgresql://", strlen("postgresql://")) == 0) if (strncmp(dbname + offset, "postgresql://", strlen("postgresql://")) == 0)
{ {
/* /*------
* new style: * new style:
* <tcp|unix>:postgresql://server[:port|:/unixsocket/path:][/db * <tcp|unix>:postgresql://server[:port|:/unixsocket/path:]
* name][?options] * [/db name][?options]
*------
*/ */
offset += strlen("postgresql://"); offset += strlen("postgresql://");
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.162 2001/03/22 06:16:20 momjian Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.163 2001/03/23 04:49:57 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -582,10 +582,11 @@ update_db_info(PGconn *conn) ...@@ -582,10 +582,11 @@ update_db_info(PGconn *conn)
if (strncmp(conn->dbName + offset, "postgresql://", strlen("postgresql://")) == 0) if (strncmp(conn->dbName + offset, "postgresql://", strlen("postgresql://")) == 0)
{ {
/* /*-------
* new style: * new style:
* <tcp|unix>:postgresql://server[:port|:/unixsocket/path:][/db * <tcp|unix>:postgresql://server[:port|:/unixsocket/path:]
* name][?options] * [/db name][?options]
*-------
*/ */
offset += strlen("postgresql://"); offset += strlen("postgresql://");
......
...@@ -1738,17 +1738,18 @@ SQLColumns( ...@@ -1738,17 +1738,18 @@ SQLColumns(
set_tuplefield_string(&row->tuple[5], field_type_name); set_tuplefield_string(&row->tuple[5], field_type_name);
/* /*----------
* Some Notes about Postgres Data Types: * Some Notes about Postgres Data Types:
* *
* VARCHAR - the length is stored in the pg_attribute.atttypmod field * VARCHAR - the length is stored in the pg_attribute.atttypmod field
* BPCHAR - the length is also stored as varchar is * BPCHAR - the length is also stored as varchar is
* *
* NUMERIC - the scale is stored in atttypmod as follows: precision = * NUMERIC - the scale is stored in atttypmod as follows:
* ((atttypmod - VARHDRSZ) >> 16) & 0xffff scale = (atttypmod
* - VARHDRSZ) & 0xffff
* *
* precision =((atttypmod - VARHDRSZ) >> 16) & 0xffff
* scale = (atttypmod - VARHDRSZ) & 0xffff
* *
*----------
*/ */
qlog("SQLColumns: table='%s',field_name='%s',type=%d,sqltype=%d,name='%s'\n", qlog("SQLColumns: table='%s',field_name='%s',type=%d,sqltype=%d,name='%s'\n",
table_name, field_name, field_type, pgtype_to_sqltype, field_type_name); table_name, field_name, field_type, pgtype_to_sqltype, field_type_name);
......
...@@ -81,16 +81,27 @@ set_statement_option(ConnectionClass *conn, ...@@ -81,16 +81,27 @@ set_statement_option(ConnectionClass *conn,
stmt->options.scroll_concurrency = vParam; stmt->options.scroll_concurrency = vParam;
break; break;
/* /*----------
* if (globals.lie) { if (conn) * if (globals.lie)
* conn->stmtOptions.scroll_concurrency = vParam; if (stmt) * {
* stmt->options.scroll_concurrency = vParam; } else { * if (conn)
* * conn->stmtOptions.scroll_concurrency = vParam;
* if (conn) conn->stmtOptions.scroll_concurrency = * if (stmt)
* SQL_CONCUR_READ_ONLY; if (stmt) * stmt->options.scroll_concurrency = vParam;
* stmt->options.scroll_concurrency = SQL_CONCUR_READ_ONLY; * } else {
* if (conn)
* conn->stmtOptions.scroll_concurrency =
* SQL_CONCUR_READ_ONLY;
* if (stmt)
* stmt->options.scroll_concurrency =
* SQL_CONCUR_READ_ONLY;
* *
* if (vParam != SQL_CONCUR_READ_ONLY) changed = TRUE; } break; * if (vParam != SQL_CONCUR_READ_ONLY)
* changed = TRUE;
* }
* break;
* }
*----------
*/ */
case SQL_CURSOR_TYPE: case SQL_CURSOR_TYPE:
......
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