Error messages on duplicate schema names

Andrus <kobruleht2@hot.ee>

From: Andrus <kobruleht2@hot.ee>
To: pgsql-general@postgresql.org
Date: 2021-01-06T17:15:24Z
Lists: pgsql-general
Hi!

ALTER DEFAULT PRIVILEGES IN SCHEMA public,public   GRANT all ON TABLES 
TO testoig;

Throws strange error

Tuple already updated by self

In other case which I posted duplicate schema causes another strange error

duplicate key value violates unique constraint 
"pg_default_acl_role_nsp_obj_index"DETAIL: Key (defaclrole, 
defaclnamespace, defaclobjtype)=(30152, 186783649, r) already exists.

Should duplicate schema names accepted or should their usage throw 
better error messages.

Andrus.

Commits

  1. Fix ALTER DEFAULT PRIVILEGES with duplicated objects