I would like to alter my sequence value in database. On top of that, I tried to get the sequence info by below query
SELECT PG_GET_SERIAL_SEQUENCE('test_thing', 'id');
which is it return to NULL.
Further check in Postgres (using HeidiSQL) db for table test_thing, I can see my primary key default value is:
(nextval('test_thing_thing_seq_id'::regclass)
which I believe is causing the result to return to NULL and would like to change/alter the value as below
(nextval('test_thing_thing_id_seq'::regclass)
The questions are:
- How I'm supposed to change the value without dropping the table and maintain the data
- Or can I just change directly from here
- Is there any future problem issue if I change directly as above (no.2) Thank you!