Theodore Petrosky <tedpet5@yahoo.com> writes:
> ALTER TABLE public.test ADD CONSTRAINT public.test_PK
> PRIMARY KEY (test);
Constraints don't have schema-qualified names. Try
ALTER TABLE public.test ADD CONSTRAINT test_PK PRIMARY KEY (test);
The error message was pointing to the correct place BTW.
regards, tom lane