Informix

Informix

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
Expand all | Collapse all

Quickie question on serial and bigserial data types

  • 1.  Quickie question on serial and bigserial data types

    Posted Thu April 10, 2025 05:15 PM

    Hi y'all.

    This is a quick question.

    I have determined that for a serial column, the coltype in syscolumns is an integer: 262. We have not loaded ak_utils here so I can't check the code to see what the coltype value is for  bigserial column.  At this time we are not yet using bigserial but I have a feeling we're gonna need to go that way before too long.

    So: What is the coltype value for a bigserial?

    (Uncharacteristically short question for me.  Who am I and what have I done with me?  ;-)



    ------------------------------
    Jacob Salomon
    ---
    Nobody goes there anymore, it's too crowded.  --Attr: Yogi Berra
    ------------------------------


  • 2.  RE: Quickie question on serial and bigserial data types

    Posted Thu April 10, 2025 05:35 PM

    coltype for a bigserial is 309

    See https://www.ibm.com/docs/en/informix-servers/14.10.0?topic=tables-syscolumns 

    Value is 53 + 256 (for the not null)



    ------------------------------
    Mike Walker
    xDB Systems, Inc
    www.xdbsystems.com
    ------------------------------



  • 3.  RE: Quickie question on serial and bigserial data types

    Posted Thu April 10, 2025 05:36 PM
    > select * from syscolumns where tabid = 338;
     
     
     
    colname      one
    tabid        338
    colno        1
    coltype      262
    collength    4
    colmin       
    colmax       
    extended_id  0
    seclabelid   0
    colattr      0
     
    colname      two
    tabid        338
    colno        2
    coltype      309
    collength    8
    colmin       
    colmax       
    extended_id  0
    seclabelid   0
    colattr      0
     
    colname      three
    tabid        338
    colno        3
    coltype      0
    collength    21
    colmin       
    colmax       
    extended_id  0
    seclabelid   0
    colattr      0
     
    3 row(s) retrieved.
     
    > info columns for both_auto_cols;
     
     
    Column name          Type                                    Nulls
     
    one                  serial                                  no
    two                  bigserial                               no
    three                char(21)                                yes



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 4.  RE: Quickie question on serial and bigserial data types

    Posted Mon April 21, 2025 07:08 PM

    Earlier today I had two failed followup posts.  I'll just provide the answers as I researched them.

    1. As Art and Mike responded, bigserial column type is 309
    2. I found through experimentation, that serial8 is column type 274.  What'sa difference?! (Except that a table cannot have both a bigserial and serial8 column.)
    3. The next value for  serial column is kept in systabinfo.ti_serialv corresponding to the partition number of the table. But what about the next serial8 and bigserial values?  Well the current for all three is in sysptnhdr, columns serialv, cur_bigserial, and cur_serial8.

    Here's a mushed version of the query as I ran it, lookin for high serial values in a database, here named "yahoo". Run in database sysmaster

    select u.database || ":" || u.tabname, u.colname,
           ptn.serialv, ptn.cur_bigserial, ptn.cur_serial8
      from sysptnhdr ptn,
           (select "yahoo" database, t.partnum, t.tabname, c.colname
              from yahoo:systables t, yahoo:syscolumns c
             where t.tabid = c.tabid
               and coltype in (262, 309, 274)    -- Serial, bigserial, serial8
             ) u 
      where ptn.partnum = u.partnum
        and ptn.serialv > 100000000
      order by ptn.serialv desc
     ;



    ------------------------------
    Jacob Salomon
    ---
    Nobody goes there anymore, it's too crowded.  --Attr: Yogi Berra
    ------------------------------



  • 5.  RE: Quickie question on serial and bigserial data types

    Posted Mon April 21, 2025 09:32 PM

    Jacob apparently attempted to post the following followup question:

    My follow-up question was: systabinfo.ti_serialv holds the next serial value for the one serial column in the table. But where can I find the next big serial value for a table that has a big serial column?  I'm guessing it is another spymaster table, but go guess its name.

    Jacob:

    In the sysmaster:sysptnhdr table (keyed by partnum) you will find columns SERIALV, CUR_BIGSERIAL, and CUR_SERIAL8.

    It should be noted for the benefit of the less informed that using any of these values to populate a record in a multi-user environment can lead to duplicate values if there is not a unique index (or unique or primary key constraint) on the associated column in the table or a duplicate key error or constraint violation error if there are such index or constraint.

    Art 



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 6.  RE: Quickie question on serial and bigserial data types

    Posted Mon April 21, 2025 09:38 PM

    I don't understand your second follow-up question, namely:
    "I found through experimentation, that serial8 is column type 274.  What'sa difference?! (Except that a table cannot have both a bigserial and serial8 column.)"

    Difference from what? From BIGSERIAL? BIGSERIAL (and BIGINT) are 64bit binary integers (ie a "C" long long) while a SERIAL8 (and INT8) is a proprietary 10 byte structure that has the same data range as BIGSERIAL. Essentially, if it were not for the fact that several system tables were modified in v11 to include INT8 types, INT8 and SERIAL8 would have been deprecated and dropped. IBM recommends no longer using INT8 or SERIAL8 in favor ot BIGINT and BIGSERIAL.

    If that is not the question, please rephrase.

    Art



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 7.  RE: Quickie question on serial and bigserial data types

    Posted Tue April 22, 2025 12:13 AM

    Thanks, Art.

    That was indeed the question.

    So I will steer my uses toward BIGSERIAL when the serial values on some tables appear in danger of wrapping around to negatives.  Thus far, the largest one is at about 70+% of that point.



    ------------------------------
    Jacob Salomon
    ---
    Nobody goes there anymore, it's too crowded.  --Attr: Yogi Berra
    ------------------------------



  • 8.  RE: Quickie question on serial and bigserial data types

    Posted Tue April 22, 2025 05:13 AM

    Deprecate - yes definitely, this should be formally done IMHO. Dropping them entirely is not so easy as the two data types require the use of different functions to get the last inserted serial value and this is embedded in codebases all over the place. Maybe HCL could make both these functions plus the third one for serials aliases for one another and let the function itself determine how it should work from the data type? This is just one of what I think would be many issues. I am not sure if it is worth it to save three bytes per row and some twos-compliment processing.

    Ben.



    ------------------------------
    Benjamin Thompson
    ------------------------------



  • 9.  RE: Quickie question on serial and bigserial data types

    Posted Tue April 22, 2025 10:11 AM

    Thank Art and Mike for the quick replies.  However, before I recommend a switch to bigserial I discovered a little problem.

    In systabinfo there is a column name ti_serialv, the next serial value to use.  Like Art I created a table with a character column, a serial and a bigserial, with a small variation: Initial values.

    create table yutz
    (
      name char(20),
      sc   serial(1000),
      bsc  bigserial(2000000)
    );

    I then inserted 2 rows into yutz:

    name                          sc                  bsc

    Joe Schmoe                  1000              2000000
    Joe Schmoe                  1001              2000001

    Now let's look at the corresponding record for table yutz in sysmaster:systabinfo:

    select u.tabname, ti.ti_serialv
      from stores7:systables u, systabinfo ti
     where u.partnum = ti.ti_partnum
       and u.tabname = "yutz";

    Yielding:

    tabname     yutz
    ti_serialv  1002

    Which begs the question: Where is the next bigserial value kept, if not is sysmaster:systabinfo?  I don't see an bigint column in systables or syscolumns.

    I will need this for a weekly report I am to generate.

    Ideas?

    Thanks so far.  But it seems I seldom have a truly simple question.



    ------------------------------
    Jacob Salomon
    ------------------------------



  • 10.  RE: Quickie question on serial and bigserial data types

    Posted Tue April 22, 2025 10:13 AM

    I posted a long, researched rejoinder earlier to Art and Mike's replies today but it seems to have vanished.  Rather than duplicate all that research I'll just start with the bottom line question... Sort of..

    For serial column in a table, there is a corresponding column is sysmaster:systabinfo: ti_serialv, the next serial value to be used in the next insert to the tables.  All fine for serial data type.  But there seems to be no corresponding "next value" for a bigserial column.  So where is that kept?  An additional table linked with systabinfo?



    ------------------------------
    Jacob Salomon
    ------------------------------



  • 11.  RE: Quickie question on serial and bigserial data types

    Posted Tue April 22, 2025 10:30 AM

    Didn't you already show this in your SQL from earlier?

    In sysmaster:sysptnhdr, the columns serialv, cur_serial8, cur_bigserial can be used to show the values for a table's serial, serial8 or bigserial column.

    Note that systabinfo is a view on sysptnhdr, so the systabinfo.ti_serialv is the same as sysptnhdr.serialv.



    ------------------------------
    Mike Walker
    xDB Systems, Inc
    www.xdbsystems.com
    ------------------------------



  • 12.  RE: Quickie question on serial and bigserial data types

    Posted Tue April 22, 2025 12:57 PM

    Jacob:

    I answered this question yesterday. The problem is that sysmaster:systabinfo is NOT a table at all but a view into sysmaster:sysptnhdr. The systabinfo view does not include the sysptnhdr columns cur_bigserial and cur_serial8 only the older serialv column. Witness:

    CREATE VIEW "informix".systabinfo (
            ti_partnum,ti_flags,ti_rowsize,ti_ncols,ti_nkeys,ti_nextns,
            ti_pagesize,ti_created,ti_serialv,ti_fextsiz,ti_nextsiz,
            ti_nptotal,ti_npused,ti_npdata,ti_nrows) 
    AS
    SELECT
            x0.partnum ,x0.flags ,x0.rowsize ,x0.ncols ,x0.nkeys ,x0.nextns 
            ,x0.pagesize ,x0.created ,x0.serialv ,x0.fextsiz ,x0.nextsiz 
            ,x0.nptotal ,x0.npused ,x0.npdata ,x0.nrows 
        FROM
            "informix".sysptnhdr x0 ;      

    While sysptnhdr is:

                   CREATE TABLE "informix".sysptnhdr (
            partnum INTEGER,
            flags BIGINT,
            rowsize INTEGER,
            ncols SMALLINT,
            nkeys SMALLINT,
            nextns INTEGER,
            pagesize INTEGER,
            created INTEGER,
            serialv INTEGER,
            fextsiz INTEGER,
            nextsiz INTEGER,
            nptotal BIGINT,
            npused BIGINT,
            npdata BIGINT,
            lockid INTEGER,
            nrows BIGINT,
            ninserts BIGINT,
            nupdates BIGINT,
            ndeletes BIGINT,
            cur_serial8 INT8,
            cur_bigserial BIGINT,
            dbsnum INTEGER,
            pta_oldvers SMALLINT,
            pta_newvers SMALLINT,
            pta_bmpagenum BIGINT,
            pta_totpgs BIGINT,
            pta_opems_allocd INTEGER,
            pta_opems_filled INTEGER,
            glscollname CHAR(32),
            acc_or_mod_tm INTEGER,
            sid INTEGER
    )
             



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 13.  RE: Quickie question on serial and bigserial data types

    Posted 30 days ago

    What Art said in his last post is correct. The 'Next Values' of the three serial types can be checked and retrieved in the sysmaster:sysptnhdr. However, you must be aware that changing a serial to a bigserial will not reset the value for the serial. This also applies to dropping the column. Even creating a new serial column does not reset the value. A check of this value will still report a high value, even if the table no longer has a serial value.
    Since IBM does not want to acknowledge this unpleasant behavior as an error, there is a feature request for this. To make matters worse, setting a new base value for a serial only works if you want to set a value greater than the existing value as the new base value. Unfortunately, this does not help here either and here too only a feature request can help to achieve changes to the behavior. So please vote for my request:

    https://ideas.ibm.com/ideas/INFX-I-658



    ------------------------------
    Andreas Seifert
    CURSOR Software AG
    http://www.admin-scout.com
    ------------------------------



  • 14.  RE: Quickie question on serial and bigserial data types

    Posted 30 days ago

    Andreas:

    You are correct about the sysptnhdr serial type values do not reset when the table is altered, 

    You can reset them to zero by using ALTER TABLE to reset the serial/serial8/bigserial column to its maximum value that will cause the next row (or is it the second next row - don't remember) to wrap to zero. 

    Art



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 15.  RE: Quickie question on serial and bigserial data types

    Posted 30 days ago

    Andreas said:

    > changing a serial to a bigserial will not reset the value for the serial.

    If I change the serial column to bigserial, I would hope it DOES inherit the current highest value from the current serial.  And since I'm not using the serial anymore, who cares if the cur_serial in sysptnhdr still has its high value? Nobody is looking at it anymore.  Dead yeast in the beer.  Just like a table with no bigserial column; the value in sysptnhdr is still 1 but nobody cares about it.

    -- Jacob S



    ------------------------------
    Jacob Salomon
    ---
    Nobody goes there anymore, it's too crowded.  --Attr: Yogi Berra
    ------------------------------



  • 16.  RE: Quickie question on serial and bigserial data types

    Posted 30 days ago

    Jacob:

    AFAIK altering a serial column to bigserial does not inherit the next value ftom the serial version. You have to alert it with an initialized to the value you want it to start with. 

    Art



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 17.  RE: Quickie question on serial and bigserial data types

    Posted 30 days ago

    Hello Art,

    Unfortunately, this does not work as documented. An ALTER TABLE modify with 0 gives a syntax error. A number > 0 for modify does not give an error, but the value for serialv in the sysptnhdr is only changed if the value in the ALTER TABLE MODIFY is greater than that in the sysptnhdr. If it is smaller, the larger value in the sysptnhdr remains unchanged.



    ------------------------------
    Andreas Seifert
    CURSOR Software AG
    http://www.admin-scout.com
    ------------------------------



  • 18.  RE: Quickie question on serial and bigserial data types

    Posted 30 days ago

    I dealt with this recently.  You are correct that you cannot change the serial to anything lower than the current value, but you can alter the table and set it higher to the maximum value and then let it wrap by inserting a dummy row and then deleting it.  That's as Art described, and it there is an article somewhere that describes this as the recommended action.  It will then start over at 1.  Interestingly, the serialv in sysptnhdr will then show a negative value.  To find the next value of the serial once it has wrapped, then you need to add 2147483647 to it.



    ------------------------------
    Mike Walker
    xDB Systems, Inc
    www.xdbsystems.com
    ------------------------------



  • 19.  RE: Quickie question on serial and bigserial data types

    Posted 29 days ago
    Hi Mike.

    Why would I want to do that if I am replacing it with a bigserial.  And if not replacing it as you suggest, I would expect a wraparound to negative numbers.  I actually found such a case with the serial column had wrapped around. My users did replace it with a serial8 (they didn't get the word about  deprecation) which is now about 3.5 billion.

    +----- Jacob Salomon --------------------------------------------------+







  • 20.  RE: Quickie question on serial and bigserial data types

    Posted 29 days ago

    Jacob - my post was a reply to Andreas about altering the value of a serial to a lower value, and I am not suggesting that you shouldn't go to a bigserial.  :-)

    Some folks are okay with the serial value wrapping as long as they aren't going to bump into duplicates, such as for a table where older records are removed.  By keeping the serial, they don't need to change their apps.  FYI, one customer did have some compatibility issue with an older application when using a BIGSERIAL but it was okay with SERIAL8 - I never did get the details.



    ------------------------------
    Mike Walker
    xDB Systems, Inc
    www.xdbsystems.com
    ------------------------------



  • 21.  RE: Quickie question on serial and bigserial data types

    Posted 29 days ago

    Jacob:

    I have to apologize, when you alter a SERIAL to a BUGSERIAL (and presumably to SERIAL8) the sysptnhdr record for the partnum is updated by copying the serialv value to cur_bigserial, so you do not have to specifically alter the column type with an initializer!

    As far as resetting to '1', witness:

     
    > select * from serial_test;
     
     
                     one two        
     
                       1 Hello     
                       2 Hello     
                       3 Hello     
                       4 Hello     
                       5 Hello     
                       6 Hello     
                       7 Hello     
                       8 Hello     
                       9 Hello     
                      10 Hello     
                      11 Hello     
                      12 hello ther
     
    12 row(s) retrieved.
     
    > alter table serial_test modify one bigserial(9223372036854775807);
     
    Table altered.
     
    > insert into serial_test values ( 0 , 'hello there');
     
    1 row(s) inserted.
     
    > insert into serial_test values ( 0 , 'hello there');
     
    1 row(s) inserted.
     
    > select * from serial_test;
     
     
                     one two        
     
                       1 Hello     
                       2 Hello     
                       3 Hello     
                       4 Hello     
                       5 Hello     
                       6 Hello     
                       7 Hello     
                       8 Hello     
                       9 Hello     
                      10 Hello     
                      11 Hello     
                      12 hello ther
     9223372036854775807 hello ther
                       1 hello ther
     
    14 row(s) retrieved.
     
    > select serialv, cur_bigserial from sysmaster:sysptnhdr where partnum = 9437276;
     
     
        serialv        cur_bigserial 
     
             12 -9223372036854775806
     
    1 row(s) retrieved.
    As Mike said, yes the sysptnhdr record shows a negative value, indicating that the value has wrapped, but inserted values do begin with '1' not -9 quintillion.
    Art


    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 22.  RE: Quickie question on serial and bigserial data types

    Posted 29 days ago
    Apology gratefully accepted! ��

    Thanks for all the help.

    I'll try to come up with another simple quicky question in some time. <grin>

    • Jacob S





  • 23.  RE: Quickie question on serial and bigserial data types

    Posted 17 days ago

    Not so fast there, Jake!

    I have discovered, to my great distress, that systabinfo.ti_serialv (and, of course, sysptnhdr.serialv) and NOTHING to to with the actual serial values. For example, for one particular table (based on partnum) I found a large negative number in systabinfo.ti_serialv. Specifically: 

    ti_serialv   -1507688642

    on the other hand, my target user, who requested the report, asked me to run select max(serial column) on the table, I got 639772559.  I KNOW they're the same table because I am specifying the same partnum.

    It appears that I have been laboring under an illusion since I started this project. Anyone know how to tap-dance?  Or at least explain this discrepancy?My discovery goes totally against the comments in sysmaster.sql.

    Feeling like quite the fool here!



    ------------------------------
    Jacob Salomon
    ------------------------------



  • 24.  RE: Quickie question on serial and bigserial data types

    Posted 17 days ago

    We addressed this before.  When the serial value wraps because it exceeds the maximum value for an integer, the value in sysptnhdr.serialv becomes negative.

    If the value is negative, adding 2147483647 (I think) to it gives you what you would see with, select max(serialcolumn)



    ------------------------------
    Mike Walker
    xDB Systems, Inc
    www.xdbsystems.com
    ------------------------------



  • 25.  RE: Quickie question on serial and bigserial data types

    Posted 17 days ago

    Jacob:

    As Mike noted, the three serial value holder fields in the table's partition header page will wrap to negative but the next serial value that is assigned when that happens is 1 calculated by adding 2^31 to the stored negative value. That's just the way it works until that wraps back to zero causing the serial values to start again from 1.

    Art



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 26.  RE: Quickie question on serial and bigserial data types

    Posted 17 days ago

    I used a bad example, Art.  But for that very same table I did this:

    select * from <table>
     where <ser-column> = (select max(<ser-column>) from table);

    and indeed, the serial column in the select * is 639,795,005 A pretty large number but a far cry from going negative. From Mike's note am I supposed to be able to map that negative number to the actual serial value I just demonstrated?  Some arcane arithmetic?



    ------------------------------
    Jacob Salomon
    ------------------------------



  • 27.  RE: Quickie question on serial and bigserial data types

    Posted 17 days ago

    Jacob:

    I would expect that the serialv stored value would be something like this:\

    639795005 - 2^31
    -1507688643

    Art



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 28.  RE: Quickie question on serial and bigserial data types

    Posted 17 days ago

    Jacob:

    You should also note that when the serial value originally wrapped, the tables rows with small serial values were likely purged to make room for the new rows which would have small values. Meanwhile larger values would still exist so SELECT max(serial_col) would NOT return the last assigned serial number but possible a value close to the max value at the time that the value wrapped. Using select max(serial_col) is rarely a useful exercise. 

    If you want to know the next serial value to be assigned, just add 2^31 to the value stored in the serialv column in the partition header if it is negative (or 2^63 to the cur_bigserial value).

    Art



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 29.  RE: Quickie question on serial and bigserial data types

    Posted 17 days ago

    The serial value may have already wrapped at some point in the past.  The serial column value will remain positive but the value in sysptnhdr.serialv is negative.

    If you want to get the current serial in a table from sysptnhdr, you need to use a case statement to add 2,147,483,647 (2^31 - 1) to it.

    SELECT t.tabname, c.colname colname,
    case
       when p.serialv < 0 then (p.serialv+2147483647)
       else p.serialv
    end serialval
    FROM sysmaster:sysptnhdr p, systables t, syscolumns c
    WHERE p.partnum = t.partnum
      and t.tabid = c.tabid
      and c.coltype =262



    ------------------------------
    Mike Walker
    xDB Systems, Inc
    www.xdbsystems.com
    ------------------------------



  • 30.  RE: Quickie question on serial and bigserial data types

    Posted 17 days ago

    Isn't this just the case of Informix internally treating the serial values as unsigned integers ( in the case of SERIAL, values from 0 to 4294967295 ), but the clients that we use cannot "print" unsigned integers, so they just "print" then as signed integers and we see negative numbers?

    More of "limitation" of what the Informix clients can "print"/represent ?

    Best regards,

    Luis Marques



    ------------------------------
    Luis Marques
    ------------------------------



  • 31.  RE: Quickie question on serial and bigserial data types

    Posted 17 days ago

    Luis:

    No. The maximum SERIAL value is 2^31-1 (2147483647) not 2^32 (4294967296). It is signed not unsigned, it's just that the algorithm for assigning the next value is a bit strange.

    So, when the serial value hits 2147483647 the next assigned value is not 2147483648 but 1. However, as Jacob has discovered, the value stored in the table's partition header page (aka TABLESPACE page) in sysmaster:sysptnhdr when the value wraps is the negative value -2147483647 (yea, not -2147483648 as one might expect). That value continues to have one added to it every time a new row is inserted into the table and so counting up towards zero. The actual current serial value is found by adding 2147483648 to the stored value in sysmaster:sysptnhdr.serialv. Once the serialv wraps again up to zero the next serial value assigned is, once again, one (yea, again, not zero). It is weird, but that's how it was coded long ago. The SERIAL8 and BIGSERIAL values work the same way except with 2^63-1 and 2^64.

    Art



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 32.  RE: Quickie question on serial and bigserial data types

    Posted 16 days ago

    Art and mainly Mike,

    There are times I just revel in being proven wrong.  This is one such time.  I will not spare y'all the details because that's where the action is.

    Preliminary: The highest a signed 32-bit number can go before wrapping to negative is 2^31 -1 == 2,147,483,647

    My conundrum was that for that one table as an example, serialv == -1,506,713,900 but the max(that serial column) is now 640,769,747, what I called a far cry from the negative serialv.

    Suppose, now, if I copy that negative number into a 64-bit integer, the sign bit would normally extend  However, I masked it with x'FFFFFFFF', effectively nulling out the sign bits.  The resulting positive number is 2,788,253,396. Let's do some subtraction:

    The masked serialv = 2,788,253,396
    Minus                2,147,483,648, the first value at which a signed 32-integer would wrap negative.
                       =   640,769,748 YIKES! That's the next serial value after the current max() of 640,769,747

    This absolutely vindicates what Mike and art have been trying to tell me (though I had to get to it my own way).  Now I have to demonstrate this to my user who first requested this report on serial values.

    So much for quickie questions.



    ------------------------------
    Jacob Salomon
    ------------------------------