Thread: Reset ACL to default for pg 8.0

Reset ACL to default for pg 8.0

From
"Juan C. Aragon"
Date:
Hi Guys:



I need to know how to reset the ACL to default (null) for a function. This
is for PostgreSQL 8.0.14 and 8.4.1 on Windows.

I used the User Interface to removed all the Privileges, but the ACL is
still = {}

I need to make the ACL to be blank (null), nothing in there.



Because if the ACL = {} and I do a db restore, it sets the ACL = <owner>,
but I need it to be blank.



Any help I will appreciate it.



Thanks,



Juan C. Aragon

Re: Reset ACL to default for pg 8.0

From
Bruce Momjian
Date:
Juan C. Aragon wrote:
> Hi Guys:
>
>
>
> I need to know how to reset the ACL to default (null) for a function. This
> is for PostgreSQL 8.0.14 and 8.4.1 on Windows.
>
> I used the User Interface to removed all the Privileges, but the ACL is
> still = {}
>
> I need to make the ACL to be blank (null), nothing in there.
>
>
>
> Because if the ACL = {} and I do a db restore, it sets the ACL = <owner>,
> but I need it to be blank.

Well, if I create a table and look at pg_dump,  I see:

    ALTER TABLE public.test OWNER TO postgres;

and the owner has permissions by default on the table.  Perhaps you want
to revoke owner permissions on the table.

Where are you seeing this ACL?

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

Re: Reset ACL to default for pg 8.0

From
"Juan C. Aragon"
Date:
Thanks Bruce for replying.

The ACL is display in the PgAdmin tool for Windows on the properties for a
table or function. ACL is the Privileges. By default, when you create a new
function or table, the ACL is null. However, if you add some privileges, and
then remove all, the ACL is not longer null, it displays the brackets {}.

I just need to know if the brackets are normal when all the privileges are
remove. Or how to reset the privileges (ACL) to default (null).

Thanks,

Juan C. Aragon

From: pgsql-bugs-owner@postgresql.org
[mailto:pgsql-bugs-owner@postgresql.org] On Behalf Of Bruce Momjian
Sent: Wednesday, April 14, 2010 10:13 PM
To: Juan C. Aragon
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] Reset ACL to default for pg 8.0

Juan C. Aragon wrote:
> Hi Guys:
>
>
>
> I need to know how to reset the ACL to default (null) for a function. This
> is for PostgreSQL 8.0.14 and 8.4.1 on Windows.
>
> I used the User Interface to removed all the Privileges, but the ACL is
> still = {}
>
> I need to make the ACL to be blank (null), nothing in there.
>
>
>
> Because if the ACL = {} and I do a db restore, it sets the ACL = <owner>,
> but I need it to be blank.

Well, if I create a table and look at pg_dump,  I see:

    ALTER TABLE public.test OWNER TO postgres;

and the owner has permissions by default on the table.  Perhaps you want
to revoke owner permissions on the table.

Where are you seeing this ACL?

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Re: Reset ACL to default for pg 8.0

From
Bruce Momjian
Date:
Juan C. Aragon wrote:
> Thanks Bruce for replying.
>
> The ACL is display in the PgAdmin tool for Windows on the properties for a
> table or function. ACL is the Privileges. By default, when you create a new
> function or table, the ACL is null. However, if you add some privileges, and
> then remove all, the ACL is not longer null, it displays the brackets {}.

I can reproduce your reported behavior in psql, which I admit is odd:

    test=> create table test(x int);
    CREATE TABLE
    test=> \pset null '(null)'
    Null display is "(null)".
    test=> grant all on test to postgres;
    GRANT
    test=> revoke all on test from postgres;
    REVOKE
    test=> select relacl from pg_class where relname = 'test';
     relacl
    --------
     {}
    (1 row)

Community, do we want to make a permission reset cause the column to
become null?

> I just need to know if the brackets are normal when all the privileges are
> remove. Or how to reset the privileges (ACL) to default (null).

They are the same.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

Re: Reset ACL to default for pg 8.0

From
Tom Lane
Date:
Bruce Momjian <bruce@momjian.us> writes:
> Community, do we want to make a permission reset cause the column to
> become null?

That's not a permission reset.

>> I just need to know if the brackets are normal when all the privileges are
>> remove. Or how to reset the privileges (ACL) to default (null).

> They are the same.

Nope, they're not.  NULL implies the built-in-default permissions, which
are quite different from the empty set.

            regards, tom lane

Re: Reset ACL to default for pg 8.0

From
"Juan C. Aragon"
Date:
Tom:

Is there a way to set it back to built-in-default permissions?

Juan C. Aragon

-----Original Message-----
From: pgsql-bugs-owner@postgresql.org
[mailto:pgsql-bugs-owner@postgresql.org] On Behalf Of Tom Lane
Sent: Friday, April 16, 2010 12:33 AM
To: Bruce Momjian
Cc: Juan C. Aragon; pgsql-bugs@postgresql.org
Subject: Re: [BUGS] Reset ACL to default for pg 8.0

Bruce Momjian <bruce@momjian.us> writes:
> Community, do we want to make a permission reset cause the column to
> become null?

That's not a permission reset.

>> I just need to know if the brackets are normal when all the privileges
are
>> remove. Or how to reset the privileges (ACL) to default (null).

> They are the same.

Nope, they're not.  NULL implies the built-in-default permissions, which
are quite different from the empty set.

            regards, tom lane

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Re: Reset ACL to default for pg 8.0

From
Bruce Momjian
Date:
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Community, do we want to make a permission reset cause the column to
> > become null?
>
> That's not a permission reset.
>
> >> I just need to know if the brackets are normal when all the privileges are
> >> remove. Or how to reset the privileges (ACL) to default (null).
>
> > They are the same.
>
> Nope, they're not.  NULL implies the built-in-default permissions, which
> are quite different from the empty set.

Oh, thanks.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com