Re: LIST OWNED BY...

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: LIST OWNED BY...
Дата
Msg-id CA+TgmoZnisALRzrc2BEZhVVVaq=1EfLF_5w6UhVq_koofjwcxQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: LIST OWNED BY...  (Thom Brown <thom@linux.com>)
Ответы Re: LIST OWNED BY...  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
On Wed, Feb 29, 2012 at 12:20 PM, Thom Brown <thom@linux.com> wrote:
> On 29 February 2012 17:16, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Thom Brown <thom@linux.com> writes:
>>> So could we introduce either a command to show which objects are owned
>>> by a particular role, or allow a dry-run of DROP OWNED BY?
>>
>> It's always been possible to do that:
>>
>>        begin;
>>        drop owned by joe;
>>        rollback;
>>
>> I believe this is already the recommended approach if you're concerned
>> about what DROP CASCADE will do.
>
> No, the cascade part is fine.  It's the objects which won't cause a
> cascade that are an issue.  Putting it in a transaction for rolling
> back doesn't help find out what it intends to drop.
>
> How can the user tell what the statement would drop (ignoring cascades)?

It's certainly possible to write a query for this, but I think this
gets back to the old argument about whether every client (and every
end-user) should be required to reimplement this, or whether maybe we
ought to provide some server functionality around it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: LIST OWNED BY...
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: controlling the location of server-side SSL files