User mapping: view over a foreign table

Поиск
Список
Период
Сортировка
От Vladimir Ryabtsev
Тема User mapping: view over a foreign table
Дата
Msg-id CAMqTPqnFvqgOnfMwvbOW6LnyobrriUBe5yDS73f71YcSHS81AA@mail.gmail.com
обсуждение исходный текст
Ответы Re: User mapping: view over a foreign table  (Vladimir Ryabtsev <greatvovan@gmail.com>)
Re: User mapping: view over a foreign table  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Supposing I have a foreign table F and a view V that selects rows from F.

The owner of F is USER1.
The owner of V is USER2.
The currently logged user is "me".

When I query the foreign table F, the DBMS engine looks for USER MAPPING for "me", regardless of who is the owner of the table.

When I query the view V, the engine searches the USER MAPPING for USER2 who is the owner of the view.

This looks inconsistent and misleading. I wonder, are there any reasons behind this design decision? Is it documented somewhere (I did not find it)?

Regards,
Vlad

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: transaction and insert
Следующее
От: Vladimir Ryabtsev
Дата:
Сообщение: Re: User mapping: view over a foreign table