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

From Tom Lane
Subject Re: Using default tablespace for database?
Date
Msg-id 1046.1101873847@sss.pgh.pa.us
Whole thread Raw
In response to Using default tablespace for database?  ("Guy Rouillier" <guyr@masergy.com>)
List pgsql-general
"Guy Rouillier" <guyr@masergy.com> writes:
> (1) create table t1 (f1 smallint) tablespace XXXXts- fails - should it?

Sure.  You didn't grant any permissions on tablespace XXXXts.

> (2) create table t1 (f1 smallint) - succeeds

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.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Newbie question: returning rowtypes from a plpgsql function
Next
From: Tom Lane
Date:
Subject: Re: createlang fails w/ 'undef ref to _SPI_restore_connection' on 8b5 on OSX 10.3.6