Re: Extensions and roles for access administration

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Виктор Егоров <vyegorov(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Extensions and roles for access administration
Date: 2012-06-22 14:12:31
Message-ID: 10587.1340374351@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?UTF-8?B?0JLQuNC60YLQvtGAINCV0LPQvtGA0L7Qsg==?= <vyegorov(at)gmail(dot)com> writes:
> - I've noticed, that after I DROP EXTENSION, all roles are still there in
> the database. Is this expected?

Roles are not considered to be part of an extension: they really can't
be, since an extension is local to a database while a role is global to
the whole installation. As per the documentation, you're allowed to do
CREATE ROLE in an extension script but it won't be managed by the
extension mechanism.

Not sure about a better solution to your problem offhand. It might be
sane for the script to do CREATE ROLE IF NOT EXISTS, if we had that,
which we do not :-(

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Benedict Holland 2012-06-22 19:01:49 insert select fails inside of function
Previous Message Raghavendra 2012-06-22 13:28:52 Re: Starting a cluster as a service