Re: Using default tablespace for database?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Guy Rouillier" <guyr(at)masergy(dot)com>
Cc: "PostgreSQL General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Using default tablespace for database?
Date: 2004-12-01 04:04:07
Message-ID: 1046.1101873847@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Guy Rouillier" <guyr(at)masergy(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-12-01 04:09:41 Re: createlang fails w/ 'undef ref to _SPI_restore_connection' on 8b5 on OSX 10.3.6
Previous Message Tom Lane 2004-12-01 03:58:11 Re: Newbie question: returning rowtypes from a plpgsql function