Re: Using default tablespace for database?

From: "Guy Rouillier" <guyr(at)masergy(dot)com>
To: "PostgreSQL General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Using default tablespace for database?
Date: 2004-12-01 05:22:00
Message-ID: CC1CF380F4D70844B01D45982E671B2348E45B@mtxexch01.add0.masergy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
>
> The presumption is that there should be no direct permission checks
> on the default tablespace for a database --- if a user has the
> ability to create tables in a database at all, then he's got the
> right to create 'em in the database's default tablespace. To do
> otherwise would break too many applications for too little gain.
> However, if you explicitly mention "tablespace foo", then you'd
> better have permissions on foo.

Tom, thank you for the reply. I understand what you are saying, and now
that I understand the rules I can work within them. This does seem
logically inconsistent, though. That I can create a table in the
database's default tablespace if I don't specify it demonstrates that I
have permission to do; this permission has been implicitly granted to
all users of the database. That implicit permission doesn't disappear
because I mention the same tablespace explicitly. I suppose the safest
thing to do is to grant create on the tablespace to all users of the DB,
so that their creates will always work if they mention the tablespace or
not.

Any idea why the tablespace name does not appear to be associated with
the table in the system catalog? Perhaps the tablespace name is not
recorded if it is the default TS?

--
Guy Rouillier

Responses

Browse pgsql-general by date

  From Date Subject
Next Message OpenMacNews 2004-12-01 05:29:04 Re: createlang fails w/ 'undef ref to
Previous Message Tom Lane 2004-12-01 05:19:54 Re: [ANNOUNCE] USENET vs Mailing Lists Poll ...