Обсуждение: owner of a table

Поиск
Список
Период
Сортировка

owner of a table

От
Raphael Bauduin
Дата:
Maybe a very stupid question (that's why I send it here :-) :
How can I see the owner of one/each table?

Thanks.

RAph

Re: owner of a table

От
Oliver Elphick
Дата:
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.Elphick@lfix.co.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

Вложения