1

Tried with

SELECT setval(ScanResults_Id_seq, (SELECT MAX("Id") from "ScanResults"), true);

and also with

ALTER SEQUENCE ScanResults_Id_seq RESTART WITH (SELECT MAX("Id") from "ScanResults");

using the sequence also in lower case but I continue to get the same error:

SQL Error [42P01]: ERROR: The relation "scanresults_id_seq" does not exist

Looking at the dependencies of the table I can see the sequence name

enter image description here

I'm not an expert so I've seen that this dependency has the same name of the Sequence and I just assumed It is it.

Majico
  • 111
  • 3
  • Note that I've tried the "setval" funciton also using false as last parameter and removing it. – Majico Oct 19 '22 at 13:29
  • Resolved using quotes on the "ALTER SEQUENCE" as said in the original question, unable to use the "setval()" function also with quotes – Majico Oct 19 '22 at 14:11

0 Answers0