Обсуждение: REASSIGN OWNED command page is not clear regarding to DEFAULT PRIVILEGE objects.

Поиск
Список
Период
Сортировка

REASSIGN OWNED command page is not clear regarding to DEFAULT PRIVILEGE objects.

От
PG Doc comments form
Дата:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/11/sql-reassign-owned.html
Description:

Hi,

Recently I try to drop a role without affecting objects dropped owned by it,
and try to use REASSIGN OWNED command to transfer ownership.
But we find DEFAULT PRIVILEGE policies are not transferred.

But we find there is no any line describing the behavior in REASSIGN OWNED
page.
https://www.postgresql.org/docs/11/sql-reassign-owned.html

Later we find a note in the source code which mentions that DEFAULT
PRIVILEGE is not handled by REASSIGN OWNED.
https://doxygen.postgresql.org/pg__shdepend_8c_source.html#l01470

Is it possible to add a note in REASSIGN OWNED page for this behavior?

Thanks.

Re: REASSIGN OWNED command page is not clear regarding to DEFAULT PRIVILEGE objects.

От
Tom Lane
Дата:
PG Doc comments form <noreply@postgresql.org> writes:
> Recently I try to drop a role without affecting objects dropped owned by it,
> and try to use REASSIGN OWNED command to transfer ownership.
> But we find DEFAULT PRIVILEGE policies are not transferred.
> ...
> Is it possible to add a note in REASSIGN OWNED page for this behavior?

The REASSIGN OWNED page does mention that it doesn't touch privileges
on non-owned objects, but I agree that it'd be better to be explicit
that that applies to default privileges.  Will fix, thanks for reporting!

            regards, tom lane


Re: REASSIGN OWNED command page is not clear regarding to DEFAULTPRIVILEGE objects.

От
Brandon Hsu
Дата:
Hi, Tom,

Thanks a lot for improving the documentation to make it clearer.

Tom Lane <tgl@sss.pgh.pa.us> 於 2019年3月26日 週二 上午4:41寫道:
PG Doc comments form <noreply@postgresql.org> writes:
> Recently I try to drop a role without affecting objects dropped owned by it,
> and try to use REASSIGN OWNED command to transfer ownership.
> But we find DEFAULT PRIVILEGE policies are not transferred.
> ...
> Is it possible to add a note in REASSIGN OWNED page for this behavior?

The REASSIGN OWNED page does mention that it doesn't touch privileges
on non-owned objects, but I agree that it'd be better to be explicit
that that applies to default privileges.  Will fix, thanks for reporting!

                        regards, tom lane


--

徐嘉群 / Brandon Hsu 0912423813

歐立威科技 Omniwaresoft Technology Inc.

Tel: (02)-2558-2656 #17 Fax:02-2558-5559

E-mail : brandon.hsu@omniwaresoft.com.tw

部落格 : http://ravenonhill.blogspot.tw/

Address: 10349台北市大同區鄭州路 87  10 


----------------------------------------------------------------------------------------------------------------------------------------------------
本信件(包括任何附件)為機密信件。若您並非指定收信人,嚴禁複製、傳送、公開或使用其所載的全部或部份資料,任何對於本信件未經授權之使用或散播可能帶有法律責任。
若您偶然獲得此郵件,請回信或立即以電話通知寄件人並且從您的電腦系統中刪除本信件及所有附件,謝謝。
The information in this e-mail may be confidential; it is intended for use solely by the individual or entity named as the recipient hereof. Disclosure, copying, distribution, or use of the contents of this e-mail by persons other than the intended recipient may violate applicable laws and if you have received this e-mail in error, please delete the original message and notify us by collect call immediately. Thank you.

----------------------------------------------------------------------------------------------------------------------------------------------------