Re: BUG #12939: GRANT ALL ON ALL SEQUENCES doesn't work for sequences not yet existing

From: "Hale, Tyler" <Tyler(dot)Hale(at)capitalone(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #12939: GRANT ALL ON ALL SEQUENCES doesn't work for sequences not yet existing
Date: 2015-04-02 17:40:39
Message-ID: 7123D00A1041B64F962A9AA1E8F045C503DCBB1221@KDCPEXCMB03.cof.ds.capitalone.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thanks for the insight Stephen. Do you know if this type of functionality is only limited to sequences or all types of database objects? I am relatively new to Postgres and am trying to come up with rules/best practices for my team to use when deploying new structures on Postgres.

Thanks,
Tyler

-----Original Message-----
From: Stephen Frost [mailto:sfrost(at)snowman(dot)net]
Sent: Wednesday, April 01, 2015 5:08 PM
To: Hale, Tyler
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #12939: GRANT ALL ON ALL SEQUENCES doesn't work for sequences not yet existing

Tyler,

* tyler(dot)hale(at)capitalone(dot)com (tyler(dot)hale(at)capitalone(dot)com) wrote:
> Running a GRANT ALL ON ALL SEQUENCES IN PUBLIC SCHEMA doesn't work
> when the sequence is created after running the GRANT statement
> regardless of whether the sequence was created implicitly or explicitly.

GRANT ALL only operates against objects which already exist.

If you wish to set default privileges, use ALTER DEFAULT PRIVILEGES.
Those will then apply for newly created objects.

Thanks!

Stephen
________________________________________________________

The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2015-04-02 17:56:39 Re: BUG #12939: GRANT ALL ON ALL SEQUENCES doesn't work for sequences not yet existing
Previous Message Tom Lane 2015-04-02 15:37:05 Re: BUG #12946: pg_dump/pg_restore not restore data for inherit tables