When a database is created, the database owner of that database gets implicitly set to the authorization identifier used in the connect operation which creates the database, for example by supplying the URL attribute "user". Note that this applies even if authentication is not (yet) enabled. In SQL, the built-in functions USER and the equivalent CURRENT_USER return the current authorization identifier.
If the database is created without supplying a user (only
possible if authentication is not enabled), the database owner
gets set to the default authorization identifier, "APP", which is
also the name of the default schema, see the section "SET
SCHEMA statement" in
the
The database owner has automatic SQL level permissions when
SQL authorization is enabled, see more about this
in
To further enhance security, when both