Re: Strange behavior of "grant temp on schema"

From: "Andrew G(dot) Saushkin" <ags(at)bsse(dot)ru>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Strange behavior of "grant temp on schema"
Date: 2013-08-02 21:01:43
Message-ID: 51FC1E37.9030403@bsse.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I apologize for my carelessness. Error rollback code including all
completed "revoke". Therefore, users can create functions. If you add
another commit before "grant temp on schema public to sec_privilege;" it
will be seen that create a function is also not possible.

> 14
> 15 create database security with owner sec_owner;
> 16
> 17 \c security
> 18 \set AUTOCOMMIT off
> 19
> 20 begin transaction;
> 21
> 22 revoke all on database security from public;
> 23 revoke all on schema public from public;
> 24
> 25 grant connect on database security to sec_privilege;
> 26 grant connect on database security to sec_ordinary;
> 27
> 28 grant create on database security to sec_privilege;
> 29 grant create on schema public to sec_privilege;

insert commit here...

> 30
> 31 \set ON_ERROR_STOP off
> 32
> 33 -- This statement generates error: "ERROR: invalid privilege type
> TEMP for schema"
> 34 -- However without this statement, "create function" is fail... Why?
> 35 grant temp on schema public to sec_privilege;
> 36
> 37 commit;
> 38

In response to

Browse pgsql-general by date

  From Date Subject
Next Message BladeOfLight16 2013-08-02 22:04:19 Re: Re: Postgres 9.2.4 for Windows (Vista) Dell Vostro 400, re-installation failure PLEASE CAN SOMEONE HELP!! (nearly fixed)
Previous Message Andrew G. Saushkin 2013-08-02 20:44:56 Strange behavior of "grant temp on schema"