pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adie <adie_xp@klub.chip.pl>
To: pgsql-sql@postgresql.org
Subject: Permissions + Views + Functions = relation not exist when not owner
Date: Wed, 25 May 2005 14:55:03 +0200 (CEST)
Message-ID: <55336.213.77.90.234.1117025703.squirrel@klub.chip.pl> (raw)

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




view thread (2+ messages)  latest in thread

Message-ID: <55336.213.77.90.234.1117025703.squirrel@klub.chip.pl>
Permalink:  ../55336.213.77.90.234.1117025703.squirrel@klub.chip.pl/
Also on:    postgresql.org/message-id/55336.213.77.90.234.1117025703.squirrel@klub.chip.pl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: adie_xp@klub.chip.pl
  Subject: Re: Permissions + Views + Functions = relation not exist when not owner
  In-Reply-To: <55336.213.77.90.234.1117025703.squirrel@klub.chip.pl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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