By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
| id |
|---|
| 1 |
| 2 |
| 3 |
INSERT 0 3
| pg_get_serial_sequence | currval |
|---|---|
| public.tablename_id_seq | 3 |
SELECT 1
CREATE SEQUENCE
CREATE TABLE
ALTER SEQUENCE
DO
| tablename | pg_get_serial_sequence | nextval |
|---|---|---|
| my_table_25 | public.my_table_25_id_seq | 1 |
SELECT 1