On Sep 15, 10:43 am, dp...@postgresql.org (Dave Page) wrote:
> Harald Armin Massa wrote:
> > Hello,
>
> > it may or may not be considered as a pgadmin error:
>
> > I try to create an index on a column of a table. Using the
> > pgadmin-wizard, that results in:
>
> > CREATE INDEX otformularkopf_test
> > ON otformularkopf (id_pkfk)
> > TABLESPACE pg_default;
>
> > with NO chance to get rid of the " TABLESPACE pg_default" clause;
> > so I am stuck with "ERROR: permission denied for tablespace pg_default"
>
> > According to the words of Master Tom in
> >http://svr5.postgresql.org/pgsql-hackers/2004-06/msg00947.php,
> > " Joe User probably shouldn't be fooling with tablespaces at all."
>
> Gah - so you can use it despite having no permissions on it if you don't
> specify it? On what planet does that seem sane?
Unfortunately it affects ALTER cases as well. And there is nothing
pgAdmin even _could_ do about that.
Say, a user has CREATE rights on tablespace foo. He moves a table
there (or creates it there). ALTER TABLE test SET TABLESPACE foo;
But later he is unhappy with the results. So he tries to move it back
where it came from: to pg_default, but he cannot! ALTER TABLE test SET TABLESPACE pg_default;
In my book that's listed under "postgres bug", not under "sane". In
practice an admin has to explicitly grant CREATE rights on pg_default
along with any CREATE rights on any tablespace, or it will be a one
way trip. How many admins would think of that or even know it?
Regards
Erwin