The example script works for me. What PG version are you running? I have
a vague recollection that we've fixed bugs-of-omission in DROP OWNED in
the past.
I'm using
"PostgreSQL 9.1.2 on x86_64-unknown-linux-gnu, compiled by gcc-4.4.real
(Debian 4.4.5-8) 4.4.5, 64-bit"
In "PostgreSQL
"Andrus" writes:
>> The example script works for me. What PG version are you running? I have
>> a vague recollection that we've fixed bugs-of-omission in DROP OWNED in
>> the past.
> I'm using
> "PostgreSQL 9.1.2 on x86_64-unknown-linux-gnu, compiled by gcc-4.4.real
>
;
Is this helpful?
Neslisah.
Gönderen: pgsql-general-ow...@postgresql.org
<pgsql-general-ow...@postgresql.org> adına Andrus <kobrule...@hot.ee>
Gönderildi: 07 Ekim 2015 Çarşamba 13:42
Kime: pgsql-general
Konu: [GENERAL] How to drop user if objects depe
Hi!
Database idd owner is role idd_owner
Database has 2 data schemas: public and firma1.
User may have directly or indirectly assigned rights in this database and
objects.
User is not owner of any object. It has only rights assigned to objects.
How to drop such user ?
I tried
revoke
On 7 October 2015 at 11:42, Andrus wrote:
> Hi!
>
> Database idd owner is role idd_owner
> Database has 2 data schemas: public and firma1.
> User may have directly or indirectly assigned rights in this database and
> objects.
> User is not owner of any object. It has only
Can you connect as user postgres? IE: psql -U postgres -d
If so, then you should have the ability to execute the commands without any
problem.
On Wed, Oct 7, 2015 at 9:53 AM, Adrian Klaver
wrote:
> On 10/07/2015 05:12 AM, Andrus wrote:
>
>> Hi!
>>
>> The objects
Hi!
The objects can't be owned by nothing, so you will need to reassign
ownership:
REASSIGN OWNED BY old_role TO new_role;
e.g.
REASSIGN OWNED BY vantaa TO postgres;
Then you can drop the role.
User who deletes other users is not superuser. It is created using
CREATE ROLE admin LOGIN
On 10/07/2015 05:12 AM, Andrus wrote:
Hi!
The objects can't be owned by nothing, so you will need to reassign
ownership:
REASSIGN OWNED BY old_role TO new_role;
e.g.
REASSIGN OWNED BY vantaa TO postgres;
Then you can drop the role.
User who deletes other users is not superuser. It is created
Hi!
No. You need to be a superuser to reassign objects unless you own the
object.
1. first connect as user postgres
2. REASSIGN all the tables owned by the missing user first.
3. Then you can drop the missing user AFTER you have reassigned all the
objects they own.
Script
reassign owned by
Hi!
I tried
So to be clear admin is doing the below, correct?
Yes. I copied provided user definition which invokes delete command from
pgadmin
code window for this user .
permission denied to reassign objects .
Is the above a blanket error or does it mention specific objects?
postgres
No. You need to be a superuser to reassign objects unless you own the
object.
You must also be a superuser to drop roles.
So.
1. first connect as user postgres
2. REASSIGN all the tables owned by the missing user first.
3. Then you can drop the missing user AFTER you have reassigned all the
"Andrus" writes:
> ALTER DEFAULT PRIVILEGES IN SCHEMA public,firma1 GRANT all ON TABLES TO
> vantaa;
I am not sure that REASSIGN OWNED will get rid of default-privilege
specifiers --- you might have to reverse this step separately.
In general, REASSIGN OWNED has to be done
Hi!
Can you connect as user postgres? IE: psql -U postgres -d
Applicaton has admin users which should be able to delete other users.
Those users dont have superuser rights.
I can connect as user postgres for testing only.
I'm looking for a way to delete users without superuser right.
If
Andrus,
>is running by superuser but it still causes the error.
That does not sound right. Please verify you are running as user postgres
with:
SELECT current_user;
Then make sure postgres is still a superuser with:
SELECT rolname as user,
CASE WHEN rolcanlogin THEN 'user'
"Andrus" writes:
>> A little further review shows that DROP OWNED is the way to get rid of
>> leftover privileges. So in general you need to do REASSIGN OWNED to move
>> the ownership of objects, then DROP OWNED to get rid of privileges granted
>> on non-owned objects, before
A little further review shows that DROP OWNED is the way to get rid of
leftover privileges. So in general you need to do REASSIGN OWNED to move
the ownership of objects, then DROP OWNED to get rid of privileges granted
on non-owned objects, before you can drop a role.
I tried this in database
I wrote:
> "Andrus" writes:
>> ALTER DEFAULT PRIVILEGES IN SCHEMA public,firma1 GRANT all ON TABLES TO
>> vantaa;
> I am not sure that REASSIGN OWNED will get rid of default-privilege
> specifiers --- you might have to reverse this step separately.
A little further review
ALTER DEFAULT PRIVILEGES IN SCHEMA public,firma1 GRANT all ON TABLES TO
vantaa;
I am not sure that REASSIGN OWNED will get rid of default-privilege
specifiers --- you might have to reverse this step separately.
In general, REASSIGN OWNED has to be done by a role that has privileges
of (is a
On 10/07/2015 09:50 AM, Andrus wrote:
ALTER DEFAULT PRIVILEGES IN SCHEMA public,firma1 GRANT all ON TABLES TO
vantaa;
I am not sure that REASSIGN OWNED will get rid of default-privilege
specifiers --- you might have to reverse this step separately.
In general, REASSIGN OWNED has to be done by
rg> ad?na Andrus <kobrule...@hot.ee>
> G?nderildi: 07 Ekim 2015 ?ar?amba 13:42
> Kime: pgsql-general
> Konu: [GENERAL] How to drop user if objects depend on it
>
> Hi!
>
> Database idd owner is role idd_owner
> Database has 2 data schemas: public and firma1.
20 matches
Mail list logo