Re: How to set default owner of objects in Postgresql

From: Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com>
To: Ashif Shaikh <sashif0(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: How to set default owner of objects in Postgresql
Date: 2019-01-16 11:22:42
Message-ID: CAGDYbUNLG-smq3G-yRqTHatoLF3=xADqg1ypbqP8KDwYTxAhDg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

In addition, you can use an event trigger to set the default owner whenever
creates the object.
https://www.postgresql.org/docs/9.6/event-trigger-definition.html

Thanks & Regards,
*Shreeyansh DBA Team*
www.shreeyansh.com

On Wed, Jan 16, 2019 at 2:40 PM Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com>
wrote:

> Hi Ashif,
>
> When we create any table in a database that table owner is a respective
> user who created the table. If user ABC creates a table in the database
> mydb then by default the owner of the object should be ABC (non superuser)
> later you can change the table owner as xyz by using alter command.
>
> Thanks & Regards,
> *Shreeyansh DBA Team*
> www.shreeyansh.com
>
>
> On Wed, Jan 16, 2019 at 2:10 PM Ashif Shaikh <sashif0(at)gmail(dot)com> wrote:
>
>> Dear Expert's,
>>
>> I wanted to know whether it is possible to set default owner of any new
>> objects being created in Postgresql 9.6?
>>
>> For eg: if user abc creates a table in database mydb then by default the
>> owner of the object should be xyz (non superuser).
>>
>> Regards,
>> Ashif Shaikh
>>
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Morris de Oryx 2019-01-16 11:29:44 Re: How to set default owner of objects in Postgresql
Previous Message Morris de Oryx 2019-01-16 09:26:41 Re: How to set default owner of objects in Postgresql