The following bug has been logged on the website:
Bug reference: 15981
Logged by: Erika ONeal
Email address: e.oneal89@gmail.com
PostgreSQL version: 11.5
Operating system: Debian
Description:
SQL to reproduce:
`CREATE TABLE test(id uuid PRIMARY KEY);
ALTER TABLE test ADD IF NOT EXISTS id uuid PRIMARY KEY;`
Output: `NOTICE: column "id" of relation "test" already exists, skipping
ERROR: multiple primary keys for table "test" are not allowed`
Expected Outcome: If the column already exists, it should not attempt to
index it with the column constraint. Or if that is the correct behavior, the
documentation does not reflect that.