formatting etc. fix
authorHeikki Linnakangas <[email protected]>
Mon, 20 Apr 2015 12:25:32 +0000 (15:25 +0300)
committerHeikki Linnakangas <[email protected]>
Mon, 20 Apr 2015 12:59:33 +0000 (15:59 +0300)
src/backend/access/sequence/seqam.c
src/backend/access/sequence/seqlocal.c
src/backend/commands/sequence.c

index 61b6f3cee11c96bc5f08b2094ec0d5fca02d9394..f18e79bb7508aa48de92250548ba2847383326c4 100644 (file)
@@ -105,7 +105,7 @@ do { \
 /*
  * seqam_init - initialize/replace custom sequence am values
  */
-extern void
+void
 seqam_init(Oid seqamid, Oid seqrelid, List *seqparams, List *reloptions,
                   Datum *values, bool *nulls)
 {
index df469576a0d888d80b4f8e418ecf331b4f15c467..6ae150888bad8398f6332d795fbb420431eff783 100644 (file)
@@ -96,7 +96,7 @@ seqam_local_init(PG_FUNCTION_ARGS)
        sequence_check_range(last_value, min_value, max_value);
 
        /*
-        * If this is new sequence or RESTART was provided in ALTER we should
+        * If this is new sequence or RESTART was provided in ALTER we should
         * reset our state to that new starting point.
         */
        if (seqrelid == InvalidOid || found_restart)
@@ -212,7 +212,7 @@ seqam_local_alloc(PG_FUNCTION_ARGS)
        /* We might need to fetch even more values for our own caching. */
        if (rescnt < fetch)
                rescnt += sequence_increment(seqrel, &next, fetch - rescnt, minv,
-                                                                       maxv, incby, is_cycled, false);
+                                                                        maxv, incby, is_cycled, false);
 
        fetch -= rescnt;
        log -= fetch;                           /* adjust for any unfetched numbers */
index 64ffd5478a1c2f7001de4a1c1b4591c7c8536799..88e7b1d50a5f87fcf18e44dee05f7f7464d85b67 100644 (file)
@@ -85,7 +85,7 @@ struct SequenceHandle
        SeqTable        elm;
        Relation        rel;
        Buffer          buf;
-       HeapTupleData   tup;
+       HeapTupleData tup;
 };
 
 /*
@@ -659,7 +659,6 @@ nextval_internal(Oid relid)
        return result;
 }
 
-
 Datum
 currval_oid(PG_FUNCTION_ARGS)
 {
@@ -896,17 +895,17 @@ create_seq_hashtable(void)
  * Given a relation OID, open and share-lock the sequence.
  */
 void
-sequence_open(Oid seqrelid, SequenceHandle *seqh)
+sequence_open(Oid relid, SequenceHandle *seqh)
 {
-       SeqTable                elm;
-       Relation                seqrel;
-       bool                    found;
+       SeqTable        elm;
+       Relation        seqrel;
+       bool            found;
 
        /* Find or create a hash table entry for this sequence */
        if (seqhashtab == NULL)
                create_seq_hashtable();
 
-       elm = (SeqTable) hash_search(seqhashtab, &seqrelid, HASH_ENTER, &found);
+       elm = (SeqTable) hash_search(seqhashtab, &relid, HASH_ENTER, &found);
 
        /*
         * Initialize the new hash table entry if it did not exist already.
@@ -994,7 +993,7 @@ sequence_read_tuple(SequenceHandle *seqh)
        lp = PageGetItemId(page, FirstOffsetNumber);
        Assert(ItemIdIsNormal(lp));
 
-       /* Note we currently only bother to set these two fields of seqh->tup */
+       /* Note we currently only bother to set these two fields of the tuple */
        seqh->tup.t_data = (HeapTupleHeader) PageGetItem(page, lp);
        seqh->tup.t_len = ItemIdGetLength(lp);