HI! I got a View which calls function which uses table. It works fine when selecting from view by owner (postgres) of table, function and view. Problem is when another user is sellecting view. There is an error: ERROR: relation "XXX" does not exist CONTEXT: PL/pgSQL function "XXX" line 4 at select into variables User has rights to select from view, use schema AND function is declared as IMMUTABLE CALLED ON NULL INPUT SECURITY DEFINER It is strange it looks like problem with permission but error is not about permissions. Calling function directly also produces error. Functions and Views are in separate schema but tables are in "public". Any idea why this is happening? Using pg7.4.6 Martin Domanski
"Adie" <adie_xp@klub.chip.pl> writes:
> I got a View which calls function which uses table.
> It works fine when selecting from view by owner (postgres) of table,
> function and view.
> Problem is when another user is sellecting view. There is an error:
> ERROR: relation "XXX" does not exist
Perhaps the other user is running with a different search_path setting?
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера