pat,
> >>What do these numbers represent? If we're talking about
> >>a key for the table,
> >>that's such a bad idea I won't help you with it. If
> >>we're talking about
> >>something else (like an entry sequence number) there are
> >>a few ways to do it,
> >>but an auto-increment number (e.g. SERIAL) isn't one of
> >>them.
>
> indeed it is a entry sequence number, not a key.
You will need a trigger to keep it sequential, then. I have a set of
triggers that does this for an ordered set of entries in a table. Keep in
mind that this will make deletes from the table really slow, as all of the
entries higher than the deleted row will have to be adjusted.
Unfortunately, I'm in the middle of a large data conversion right now; please
pester me in a week and I'll get you the triggers. Or maybe someone else
will post something.
--
-Josh Berkus
Aglio Database Solutions
San Francisco