Re: patch for type privileges

Peter Eisentraut <peter_e@gmx.net>

From: Peter Eisentraut <peter_e@gmx.net>
To: Yeb Havinga <yebhavinga@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2011-12-07T18:59:09Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Support range data types.

Attachments

On fre, 2011-12-02 at 17:11 +0100, Yeb Havinga wrote:
> Using a cast, it is possible to create a table with a code path through 
> OpenIntoRel:
> 
> session 1:
> t=# revoke all on type int2 from public;
> session2 :
> t=> create table t2 (a int2);
> ERROR:  permission denied for type smallint
> t=> create table t as (select 1::int2 as a);
> SELECT 1
> t=> \d t
>         Table "public.t"
>   Column |   Type   | Modifiers
> --------+----------+-----------
>   a      | smallint |
> 
> t=>
> 
> Something different: as non superuser I get this error when restricting 
> a type I don't own:
> 
> t=> revoke all on type int2 from public;
> ERROR:  unrecognized objkind: 6

Two excellent finds.  Here is an updated patch with fixes.