[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: Give default privileges to another SuperUser ?
From:       "David G. Johnston" <david.g.johnston () gmail ! com>
Date:       2022-02-17 21:17:49
Message-ID: CAKFQuwYOdGZ6Hi_1NRyAV4YjVbTvuhQLvY+M=Gd0ZtJ5UBcmiQ () mail ! gmail ! com
[Download RAW message or body]

On Thu, Feb 17, 2022 at 2:14 PM celati Laurent <laurent.celati@gmail.com>
wrote:

>
>> ALTER DEFAULT PRIVILEGES IN SCHEMA XXX GRANT SELECT ON TABLES TO "user";
>
>
> Does a person know how to give privileges to a SuperUser role so that when
> he creates a new table, whether in the public schema or another schema, the
> table will be by default visible,
>

ALTER DEFAULT PRIVILEGES
    [ FOR { ROLE | USER } target_role [, ...] ]

This use case is why the "FOR target_role" clause exists.

David J.

[Attachment #3 (text/html)]

<div dir="ltr"><div dir="ltr"><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif"><span \
style="font-family:Arial,Helvetica,sans-serif">On Thu, Feb 17, 2022 at 2:14 PM celati \
Laurent &lt;<a href="mailto:laurent.celati@gmail.com">laurent.celati@gmail.com</a>&gt; \
wrote:</span><br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><br>ALTER DEFAULT PRIVILEGES IN SCHEMA XXX GRANT \
SELECT ON TABLES TO &quot;user&quot;;</blockquote></div><div><br></div><div>Does a \
person know how to give privileges to a SuperUser role so that when he creates a new \
table, whether in the public schema or another schema, the table will be by default \
visible,</div></div></blockquote><div><br></div><div>ALTER DEFAULT PRIVILEGES<br>     \
[ FOR { ROLE | USER } target_role [, ...] ]<br></div><div><br></div><div><div \
class="gmail_default" style="font-family:arial,helvetica,sans-serif">This use case is \
why  the &quot;FOR target_role&quot; clause exists.</div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" \
style="font-family:arial,helvetica,sans-serif">David J.</div></div><div \
class="gmail_default" \
style="font-family:arial,helvetica,sans-serif"><br></div></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic