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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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 http://www.lfix.co.uk/oliver
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

Browse pgsql-novice by date

  From Date Subject
Next Message denis 2002-01-30 11:39:01 Re: newbie-problem
Previous Message Oliver Elphick 2002-01-30 11:29:39 Re: newbie-problem