I need help to find out a away to check if a user is the owner of a detabase. Is there any query that does it? I am coding a tool that receive from the user the informations about the database(server, password, user id, ...) and then checks if the user is the owner of the database. If it is ok, it executes a set o scripts. I know that with psql we can find out the database owners, but what I really need is a query.