Re: [COMMITTERS] pgsql: Fix pg_dump to dump shell types. - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [COMMITTERS] pgsql: Fix pg_dump to dump shell types.
Date
Msg-id 55C902E8.2010400@gmx.net
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Fix pg_dump to dump shell types.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [COMMITTERS] pgsql: Fix pg_dump to dump shell types.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 8/9/15 6:23 PM, Tom Lane wrote:
> It looks to me like the reason for this is that pg_dump forces the
> "typacl" of a type to be '{=U}' when reading the schema data for a
> pre-9.2 type, rather than reading it as NULL (ie default permissions)
> which would result in not printing any grant/revoke commands for
> the object.
> 
> I do not see a good reason for that; quite aside from this problem,
> it means there is one more place that knows the default permissions
> for a type than there needs to be.  Peter, what was the rationale?

This was probably just copied from how proacl and lanacl are handled,
which predate typacl by quite a bit.  Maybe there was a reason in those
days.

It might also have something to do with how owner privileges are
handled.  An explicit '{=U}' doesn't create owner privileges, unlike a
null value in that field.  Maybe this is necessary if you dump and
restore between databases with different user names.





pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: WIP: SCRAM authentication
Next
From: Stephen Frost
Date:
Subject: Re: Asynchronous execution on FDW