If you attempt to set a sequence number like this:
SELECT setval('table_ID_seq', (SELECT max("ID") + 1 FROM table));
You might encounter the following error:
ERROR: relation "table_ID_seq" does not exist
LINE 1: SELECT setval('table_ID_seq', (SELECT max("ID") + 1 FROM t...
^
********** Error **********
ERROR: relation "table_id_seq" does not exist
SQL Status:42P01
The problem is that PostgreSQL will normalize identifier names unless they are put in double quotes.
However, this will not work:
Instead, you will have to put single-quotes around the double-quoted text: