This is a PostgreSQL question not DBI but from the user manual...
"After a sequence is created, you may use the function nextval(seqname)
to get a new number from the sequence. The function currval('seqname')
may be used to determine the number returned by the last call to
nextval(seqname) for the specified sequence in the current session. The
function setval('seqname', newvalue) may be used to set the current
value of the specified sequence. The next call to nextval(seqname) will
return the given value plus the sequence increment.
Use a query like
SELECT * FROM sequence_name;
to get the parameters of a sequence. Aside from fetching the original
parameters, you can use
SELECT last_value FROM sequence_name;
--
Simon Oliver