Tablespace permissions issue

From: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Tablespace permissions issue
Date: 2004-06-28 05:35:35
Message-ID: Pine.LNX.4.58.0406281529570.16981@linuxworld.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Chris KL just raised an issue on IRC:

test=> create table test (a int4) tablespace pg_default;
ERROR: permission denied for tablespace pg_default

This wasn't encountered in my original patch because
pg_tablespace_aclmask() had this test reasonably early on:

+ if(tbloid == DEFAULTTBLSPC)
+ return (mask);

I guess that might have been a bit presumptuous but a similar thing
happens if you don't specify a tablespace:

tablespaceId = get_namespace_tablespace(namespaceId);
/* note no permission check on tablespace in this case */

What should the solution be?

Gavin

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Satoshi Nagayasu 2004-06-28 06:16:54 Re: lock timeout patch
Previous Message Tom Lane 2004-06-28 05:02:44 Re: lock timeout patch