Right. I don't think any SQL database does. They all store the next unique key 
value(s) in some kind of master table for the database. That is what nextval() 
returns, not the next unused sequence.

Bob S


On Aug 31, 2016, at 14:31 , Dr. Hawkins 
<[email protected]<mailto:[email protected]>> wrote:

I think I see what is happening.

The nextval() in postgres does *not* consider the numbers in use in the
sequence; I thought it had.

So adding

put "ALTER SEQUENCE " & dhtbl_dbtr & "_unqKy_seq RESTART WITH 1001;" & cr
after dcmd


Instead of inserting ckCap solves the problem.

I tried

MIN(1001, MAX(unqKy))

but it didn't like the min

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to