Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2009

    Unanswered: Checking DB ownership

    Hello all,
    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.


  2. #2
    Join Date
    Nov 2003
    Provided Answers: 23
    You are looking for pg_database:

    Btw: if you start psql with the -E option you can see all queries that psql sends to the server, e.g. how it checks for the DB owner.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts