Re: REASSIGN OWNED BY alters objects in other database.

Поиск
Список
Период
Сортировка
От Álvaro Herrera
Тема Re: REASSIGN OWNED BY alters objects in other database.
Дата
Msg-id 202601011635.6rfmtndnltdv@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: REASSIGN OWNED BY alters objects in other database.  (Kirill Reshke <reshkekirill@gmail.com>)
Список pgsql-hackers
On 2025-Dec-30, Kirill Reshke wrote:

> Yep, they are shared, but subscriptions are created in database context...

True.

> I want to delete user, which has subscription s1 in db1 and subscription s2
> in db2. I want to REASSIGN all object from db1 to db1 owner and same for
> db2.
> I will do REASSIGN OWNED BY ... to <db owner> in each of these database,
> and then drop user. I excpect that sql I do in db1 does not affect objects
> in db2... Am I wrong in this assumption? Like, subscriptions have knowledge
> of which database they are belong... maybe we should use this knowledge

Yeah, I can see that there is merit to this idea, and I think it's not
very difficult to implement -- POC attached.  Does this solve your
issue?

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/

Вложения

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