Re: I'm OWNER of the db but I get `permission denied` when - Mailing list pgsql-general

From Michael Fuhr
Subject Re: I'm OWNER of the db but I get `permission denied` when
Date
Msg-id 20050323165238.GA52453@winnie.fuhr.org
Whole thread Raw
In response to Re: I'm OWNER of the db but I get `permission denied` when  (Richard Huxton <dev@archonet.com>)
Responses Re: I'm OWNER of the db but I get `permission denied` when
List pgsql-general
On Wed, Mar 23, 2005 at 04:07:59PM +0000, Richard Huxton wrote:

> Don't forget pg_class isn't in your database, it's shared by all.

Each database has its own pg_class:

SELECT relname, relkind, relisshared
FROM pg_class
WHERE relname = 'pg_class';

 relname  | relkind | relisshared
----------+---------+-------------
 pg_class | r       | f
(1 row)

You can query pg_class to see that its contents are different in
different databases, and you can use "ls -li" on the on-disk files
to see that they have different inode numbers and (usually) different
sizes and modified times.

Here are the shared objects in an 8.0.1 database (excluding indexes):

SELECT relname, relkind
FROM pg_class
WHERE relkind <> 'i' AND relisshared IS TRUE
ORDER BY relname;

    relname    | relkind
---------------+---------
 pg_database   | r
 pg_group      | r
 pg_shadow     | r
 pg_tablespace | r
 pg_toast_1260 | t
 pg_toast_1261 | t
 pg_toast_1262 | t
 pg_xactlock   | s
(8 rows)

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Tzahi Fadida
Date:
Subject: Existence of tuples in relations and a multicolumn index.
Next
From: "A. Mous"
Date:
Subject: Re: Simple query takes a long time on win2K