I have an application that often does insertion into PostgreSQL database, for some tables I have
id column with
serial type with auto-generated sequences. Running
SELECT nextval(pg_get_serial_sequence('client', 'id'));
on each new session gives 1. What should I do to correct this, or I need to this manually in my app?
For last case, I think get total records and alter sequence, but this is 2 more queries to do, which I better skip.