Re: Using default tablespace for database? - Mailing list pgsql-general

From Guy Rouillier
Subject Re: Using default tablespace for database?
Date
Msg-id CC1CF380F4D70844B01D45982E671B2348E45B@mtxexch01.add0.masergy.com
Whole thread Raw
In response to Using default tablespace for database?  ("Guy Rouillier" <guyr@masergy.com>)
Responses Re: Using default tablespace for database?
List 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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [ANNOUNCE] USENET vs Mailing Lists Poll ...
Next
From: OpenMacNews
Date:
Subject: Re: createlang fails w/ 'undef ref to