If you have no permission or inclination to actually define something in
the database, here is a shell-based alternative:
---
# psql -Aqt -U evaristesys_adm -d evaristesys \
-c "SELECT sequence_name FROM information_schema.sequences WHERE sequence_schema = 'public' ORDER BY sequence_name;"
\
| while read SEQ;
do
echo -n "$SEQ: ";
psql -Aqt -U evaristesys_adm -d evaristesys -c "SELECT last_value FROM $SEQ;";
done
---
-- Alex
--
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/