BUG #18389: pg_database_owner not recognized with alter default privileges

PG Bug reporting form <noreply@postgresql.org>

From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: m.kristo@rewe-group.at
Date: 2024-03-12T19:04:11Z
Lists: pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18389
Logged by:          Marijo Kristo
Email address:      m.kristo@rewe-group.at
PostgreSQL version: 16.2
Operating system:   Debian
Description:        

Hello,

i am precreating schemas in template1 database and setting specific
privileges.
When performing "alter default privileges for role pg_database_owner ..."
the group is recognized and the default privilege is also set. No error is
thrown. 

When i create a new database the pg_database_owner role is not working
correctly. I created then the same privilege with specifying the db owner
and then the privilege works. 

Please, check this. Thank you !

Br
Marijo Kristo