pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Permissions + Views + Functions = relation not exist when not owner
2+ messages / 2 participants
[nested] [flat]

* Permissions + Views + Functions = relation not exist when not owner
@ 2005-05-25 12:55  Adie <adie_xp@klub.chip.pl>
  0 siblings, 1 reply; 2+ messages in thread

From: Adie @ 2005-05-25 12:55 UTC (permalink / raw)
  To: pgsql-sql

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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Permissions + Views + Functions = relation not exist when not owner
@ 2005-05-25 13:58  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Adie <adie_xp@klub.chip.pl>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2005-05-25 13:58 UTC (permalink / raw)
  To: Adie <adie_xp@klub.chip.pl>; +Cc: pgsql-sql

"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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-05-25 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-05-25 12:55 Permissions + Views + Functions = relation not exist when not owner Adie <adie_xp@klub.chip.pl>
2005-05-25 13:58 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox