From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ertan Küçükoðlu <ertan.kucukoglu@1nar.com.tr>
Cc: pgsql-general@postgresql.org
Subject: Re: Eror while dropping a user
Date: Fri, 03 Aug 2018 18:22:56 -0400
Message-ID: <7210.1533334976@sss.pgh.pa.us> (raw)
In-Reply-To: <00a801d42b6a$6cb81c80$46285580$@1nar.com.tr>
References: <00a801d42b6a$6cb81c80$46285580$@1nar.com.tr>
=?iso-8859-9?B?RXJ0YW4gS/zn/Gtv8Gx1?= <ertan.kucukoglu@1nar.com.tr> writes:
> Using PostgreSQL 9.6.9 on Linux amd64 platform.
> 2018-08-03 23:24:03.901 Drop user failed: SQL Error: ERROR: role
> "pars.test" cannot be dropped because some objects depend on it
> AYRINTI: 1 object in database postgres
I see you've resolved your problem, but for future reference, note that
you could have gotten a more detailed error message if you'd issued the
DROP USER while connected to the postgres database. When the command
is issued in database A, we can't see the details of what the user owns
in database B, only that there is something over there :-(
FWIW, I'm guessing that the issue was not object ownership per se,
but permissions granted on some object owned by someone else. Those
have to be revoked as well before a DROP USER will succeed.
You might also care to read up on DROP OWNED BY.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, ertan.kucukoglu@1nar.com.tr
Subject: Re: Eror while dropping a user
In-Reply-To: <7210.1533334976@sss.pgh.pa.us>
References: <00a801d42b6a$6cb81c80$46285580$@1nar.com.tr> <7210.1533334976@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox