Re: Read only access, via functions only

From: ries van Twisk <pg(at)rvt(dot)dds(dot)nl>
To: "Webb Sprague" <webb(dot)sprague(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Read only access, via functions only
Date: 2008-11-05 23:49:08
Message-ID: 3BF9D239-C704-40C9-913D-92CE224693AA@rvt.dds.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Nov 5, 2008, at 6:46 PM, Webb Sprague wrote:

> Hi all
>
> Is there a away to set up a schema such that a certain role has (1)
> read only access to (2) all the tables, but (3) must use predefined
> functions to use that access?
>
> Items 1 and 2 are so that the end user doesn't stomp on the data.
>
> I want item 3 in order to force the application programmers (PHP) not
> to craft their own select statements but to go through the API

What about using views?

>
>
> Thoughts? I have about given up, but maybe somebody can make it easy
> for me.
>
> Running version 8.2.something (stupid Linux Distros)

There is nothing stupid on a Linux distro....

>
>
> (I can post code if necessary, I am just feeling a little lazy...)

Don't be lazy.... ;)
If we are lazy, you wouldn't see a reply.....

Ries

>
>
> Thanks
> W
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

regards, Ries van Twisk

-------------------------------------------------------------------------------------------------
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2008-11-05 23:53:18 Re: Read only access, via functions only
Previous Message Webb Sprague 2008-11-05 23:46:16 Read only access, via functions only