pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Tambet Matiisen <t.matiisen@aprote.ee>
To: pgsql-sql@postgresql.org
Subject: Re: Grant execute on functions; related objects permissions ?
Date: Mon, 6 Jan 2003 12:45:25 +0200
Message-ID: <81132473206F3A46A72BD6116E1A06AE1B14BA@black.aprote.com> (raw)
In PostgreSQL 7.3 you have option to execute function with owner's rights or caller's rights. Default is caller's rights (as it was before 7.3), you probably want owner's rights. See development version of docs:
http://developer.postgresql.org/docs/postgres/sql-createfunction.html
btw, views "execute" also with owner's rights, ie if you grant select on view, you do not have to grant select on every table used in view. Still current_user in view returns "caller", while maybe it should return owner?
Tambet
>
> PostgreSQL 7.3 happily introduced permissions on functions.
> Now, having
> granted execution to a given function to a given user, I find
> myself with
> "access denied" errors on the objects that the function
> actually uses (e.g.
> a table on which it makes a select). So:
>
> 1. Am I missing something about how the GRANT ... ON FUNCTION works ?
>
> 2. Is there any way to automatically obtain privileges on the
> objects the
> function uses, without having to GRANT specific permissions
> on those object
> (the same way it works on MS-SQL) ?
>
> 3. Am I following the wrong direction (I understand question 2. might
> actually introduce a permission "hole" on the objects that
> functions might
> use; a user might obtain access to these objects through
> defining its own
> function, am I right ?) ?
>
view thread (3+ messages) latest in thread
Message-ID: <81132473206F3A46A72BD6116E1A06AE1B14BA@black.aprote.com> Permalink: ../81132473206F3A46A72BD6116E1A06AE1B14BA@black.aprote.com/ Also on: postgresql.org/message-id/81132473206F3A46A72BD6116E1A06AE1B14BA@black.aprote.com ·
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 from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-sql@postgresql.org Cc: t.matiisen@aprote.ee Subject: Re: Grant execute on functions; related objects permissions ? In-Reply-To: <81132473206F3A46A72BD6116E1A06AE1B14BA@black.aprote.com> References: <81132473206F3A46A72BD6116E1A06AE1B14BA@black.aprote.com> * 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