aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/common')
-rw-r--r--src/backend/access/common/heaptuple.c43
-rw-r--r--src/backend/access/common/indextuple.c8
-rw-r--r--src/backend/access/common/printtup.c12
-rw-r--r--src/backend/access/common/tupdesc.c12
4 files changed, 38 insertions, 37 deletions
diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c
index 97aa50855f1..c4bbd5923fa 100644
--- a/src/backend/access/common/heaptuple.c
+++ b/src/backend/access/common/heaptuple.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/common/heaptuple.c,v 1.93 2004/08/29 04:12:17 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/common/heaptuple.c,v 1.94 2004/08/29 05:06:39 momjian Exp $
*
* NOTES
* The old interface functions have been converted to macros
@@ -468,17 +468,19 @@ heap_getsysattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull)
break;
/*
- * If the attribute number is 0, then we are supposed to return
- * the entire tuple as a row-type Datum. (Using zero for this
- * purpose is unclean since it risks confusion with "invalid attr"
- * result codes, but it's not worth changing now.)
+ * If the attribute number is 0, then we are supposed to
+ * return the entire tuple as a row-type Datum. (Using zero
+ * for this purpose is unclean since it risks confusion with
+ * "invalid attr" result codes, but it's not worth changing
+ * now.)
*
- * We have to make a copy of the tuple so we can safely insert the
- * Datum overhead fields, which are not set in on-disk tuples.
+ * We have to make a copy of the tuple so we can safely insert
+ * the Datum overhead fields, which are not set in on-disk
+ * tuples.
*/
case InvalidAttrNumber:
{
- HeapTupleHeader dtup;
+ HeapTupleHeader dtup;
dtup = (HeapTupleHeader) palloc(tup->t_len);
memcpy((char *) dtup, (char *) tup->t_data, tup->t_len);
@@ -555,7 +557,7 @@ heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest)
* construct a tuple from the given values[] and nulls[] arrays
*
* Null attributes are indicated by a 'n' in the appropriate byte
- * of nulls[]. Non-null attributes are indicated by a ' ' (space).
+ * of nulls[]. Non-null attributes are indicated by a ' ' (space).
* ----------------
*/
HeapTuple
@@ -580,7 +582,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
/*
* Check for nulls and embedded tuples; expand any toasted attributes
- * in embedded tuples. This preserves the invariant that toasting can
+ * in embedded tuples. This preserves the invariant that toasting can
* only go one level deep.
*
* We can skip calling toast_flatten_tuple_attribute() if the attribute
@@ -620,7 +622,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
len += ComputeDataSize(tupleDescriptor, values, nulls);
/*
- * Allocate and zero the space needed. Note that the tuple body and
+ * Allocate and zero the space needed. Note that the tuple body and
* HeapTupleData management structure are allocated in one chunk.
*/
tuple = (HeapTuple) palloc0(HEAPTUPLESIZE + len);
@@ -683,9 +685,9 @@ heap_modifytuple(HeapTuple tuple,
* allocate and fill values and nulls arrays from either the tuple or
* the repl information, as appropriate.
*
- * NOTE: it's debatable whether to use heap_deformtuple() here or
- * just heap_getattr() only the non-replaced colums. The latter could
- * win if there are many replaced columns and few non-replaced ones.
+ * NOTE: it's debatable whether to use heap_deformtuple() here or just
+ * heap_getattr() only the non-replaced colums. The latter could win
+ * if there are many replaced columns and few non-replaced ones.
* However, heap_deformtuple costs only O(N) while the heap_getattr
* way would cost O(N^2) if there are many non-replaced columns, so it
* seems better to err on the side of linear cost.
@@ -763,10 +765,11 @@ heap_deformtuple(HeapTuple tuple,
bool slow = false; /* can we use/set attcacheoff? */
natts = tup->t_natts;
+
/*
- * In inheritance situations, it is possible that the given tuple actually
- * has more fields than the caller is expecting. Don't run off the end
- * of the caller's arrays.
+ * In inheritance situations, it is possible that the given tuple
+ * actually has more fields than the caller is expecting. Don't run
+ * off the end of the caller's arrays.
*/
natts = Min(natts, tdesc_natts);
@@ -787,9 +790,7 @@ heap_deformtuple(HeapTuple tuple,
nulls[attnum] = ' ';
if (!slow && att[attnum]->attcacheoff >= 0)
- {
off = att[attnum]->attcacheoff;
- }
else
{
off = att_align(off, att[attnum]->attalign);
@@ -807,8 +808,8 @@ heap_deformtuple(HeapTuple tuple,
}
/*
- * If tuple doesn't have all the atts indicated by tupleDesc, read
- * the rest as null
+ * If tuple doesn't have all the atts indicated by tupleDesc, read the
+ * rest as null
*/
for (; attnum < tdesc_natts; attnum++)
{
diff --git a/src/backend/access/common/indextuple.c b/src/backend/access/common/indextuple.c
index d6191a2cfe4..d305734c3e7 100644
--- a/src/backend/access/common/indextuple.c
+++ b/src/backend/access/common/indextuple.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/common/indextuple.c,v 1.70 2004/08/29 04:12:17 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/common/indextuple.c,v 1.71 2004/08/29 05:06:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -162,9 +162,9 @@ index_formtuple(TupleDesc tupleDescriptor,
if ((size & INDEX_SIZE_MASK) != size)
ereport(ERROR,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
- errmsg("index row requires %lu bytes, maximum size is %lu",
- (unsigned long) size,
- (unsigned long) INDEX_SIZE_MASK)));
+ errmsg("index row requires %lu bytes, maximum size is %lu",
+ (unsigned long) size,
+ (unsigned long) INDEX_SIZE_MASK)));
infomask |= size;
diff --git a/src/backend/access/common/printtup.c b/src/backend/access/common/printtup.c
index 98dc37a76ea..4477a65bb2d 100644
--- a/src/backend/access/common/printtup.c
+++ b/src/backend/access/common/printtup.c
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/common/printtup.c,v 1.84 2004/08/29 04:12:17 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/common/printtup.c,v 1.85 2004/08/29 05:06:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -356,7 +356,7 @@ printtup(HeapTuple tuple, TupleDesc typeinfo, DestReceiver *self)
outputstr = DatumGetCString(FunctionCall3(&thisState->finfo,
attr,
- ObjectIdGetDatum(thisState->typioparam),
+ ObjectIdGetDatum(thisState->typioparam),
Int32GetDatum(typeinfo->attrs[i]->atttypmod)));
pq_sendcountedtext(&buf, outputstr, strlen(outputstr), false);
pfree(outputstr);
@@ -368,7 +368,7 @@ printtup(HeapTuple tuple, TupleDesc typeinfo, DestReceiver *self)
outputbytes = DatumGetByteaP(FunctionCall2(&thisState->finfo,
attr,
- ObjectIdGetDatum(thisState->typioparam)));
+ ObjectIdGetDatum(thisState->typioparam)));
/* We assume the result will not have been toasted */
pq_sendint(&buf, VARSIZE(outputbytes) - VARHDRSZ, 4);
pq_sendbytes(&buf, VARDATA(outputbytes),
@@ -458,7 +458,7 @@ printtup_20(HeapTuple tuple, TupleDesc typeinfo, DestReceiver *self)
outputstr = DatumGetCString(FunctionCall3(&thisState->finfo,
attr,
- ObjectIdGetDatum(thisState->typioparam),
+ ObjectIdGetDatum(thisState->typioparam),
Int32GetDatum(typeinfo->attrs[i]->atttypmod)));
pq_sendcountedtext(&buf, outputstr, strlen(outputstr), true);
pfree(outputstr);
@@ -579,7 +579,7 @@ debugtup(HeapTuple tuple, TupleDesc typeinfo, DestReceiver *self)
value = DatumGetCString(OidFunctionCall3(typoutput,
attr,
- ObjectIdGetDatum(typioparam),
+ ObjectIdGetDatum(typioparam),
Int32GetDatum(typeinfo->attrs[i]->atttypmod)));
printatt((unsigned) i + 1, typeinfo->attrs[i], value);
@@ -672,7 +672,7 @@ printtup_internal_20(HeapTuple tuple, TupleDesc typeinfo, DestReceiver *self)
outputbytes = DatumGetByteaP(FunctionCall2(&thisState->finfo,
attr,
- ObjectIdGetDatum(thisState->typioparam)));
+ ObjectIdGetDatum(thisState->typioparam)));
/* We assume the result will not have been toasted */
pq_sendint(&buf, VARSIZE(outputbytes) - VARHDRSZ, 4);
pq_sendbytes(&buf, VARDATA(outputbytes),
diff --git a/src/backend/access/common/tupdesc.c b/src/backend/access/common/tupdesc.c
index 66403a1b6b6..ed932d35ab6 100644
--- a/src/backend/access/common/tupdesc.c
+++ b/src/backend/access/common/tupdesc.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/common/tupdesc.c,v 1.105 2004/08/29 04:12:17 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/common/tupdesc.c,v 1.106 2004/08/29 05:06:39 momjian Exp $
*
* NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be
@@ -52,8 +52,8 @@ CreateTemplateTupleDesc(int natts, bool hasoid)
/*
* Allocate enough memory for the tuple descriptor, and zero the
- * attrs[] array since TupleDescInitEntry assumes that the array
- * is filled with NULL pointers.
+ * attrs[] array since TupleDescInitEntry assumes that the array is
+ * filled with NULL pointers.
*/
desc = (TupleDesc) palloc(sizeof(struct tupleDesc));
@@ -420,8 +420,8 @@ TupleDescInitEntry(TupleDesc desc,
/*
* Note: attributeName can be NULL, because the planner doesn't always
- * fill in valid resname values in targetlists, particularly for resjunk
- * attributes.
+ * fill in valid resname values in targetlists, particularly for
+ * resjunk attributes.
*/
if (attributeName != NULL)
namestrcpy(&(att->attname), attributeName);
@@ -464,7 +464,7 @@ TupleDescInitEntry(TupleDesc desc,
* Given a relation schema (list of ColumnDef nodes), build a TupleDesc.
*
* Note: the default assumption is no OIDs; caller may modify the returned
- * TupleDesc if it wants OIDs. Also, tdtypeid will need to be filled in
+ * TupleDesc if it wants OIDs. Also, tdtypeid will need to be filled in
* later on.
*/
TupleDesc