Skip site navigation (1) Skip section navigation (2)

Re: owner of a table

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Raphael Bauduin <raphael(at)be(dot)easynet(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: owner of a table
Date: 2002-01-30 11:34:02
Message-ID: 1012390443.17615.241.camel@linda (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Wed, 2002-01-30 at 10:50, Raphael Bauduin wrote:
> Maybe a very stupid question (that's why I send it here :-) :
> How can I see the owner of one/each table?

  SELECT c.relname, u.usename
    FROM pg_class AS c, pg_user AS u
    WHERE c.relname = 'your_table_name' AND u.usesysid = c.relowner;

Oliver Elphick                                Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight                    
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C

     "The Lord knoweth how to deliver the godly out of 
      temptations, and to reserve the unjust unto the day of
      judgment to be punished;"            II Peter 2:9 

In response to

pgsql-novice by date

Next:From: denisDate: 2002-01-30 11:39:01
Subject: Re: newbie-problem
Previous:From: Oliver ElphickDate: 2002-01-30 11:29:39
Subject: Re: newbie-problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group