Check out example codes for "psql get sequences". It will help you in understanding the concepts better.

Code Example 1

# Get all sequences
SELECT c.relname FROM pg_class c WHERE c.relkind = 'S';

# Get last value of a sequence
SELECT last_value FROM test_id_seq;

Learn ReactJs, React Native from akashmittal.com