From: | Alex Balashov <abalashov(at)evaristesys(dot)com> |
---|---|
To: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Sequences |
Date: | 2018-12-04 19:26:50 |
Message-ID: | 20181204192650.GM769@tlaquepaque.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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/
From | Date | Subject | |
---|---|---|---|
Next Message | Campbell, Lance | 2018-12-04 19:47:19 | Re: Sequences |
Previous Message | Alex Balashov | 2018-12-04 19:17:51 | Re: Sequences |