From: | John Purser <jmpurser(at)gmail(dot)com> |
---|---|
To: | "Vladimir A(dot) Petrov" <vap(at)infopac(dot)ru> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: How to restrict select from table with external |
Date: | 2006-07-11 12:00:02 |
Message-ID: | 20060711050002.53a6dbc8.jmpurser@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Vladimir,
Have you considered using a viw of table stats with the columns and
information your user is allowed to see?
John Purser
On Tue, 11 Jul 2006 09:37:19 +0500
"Vladimir A. Petrov" <vap(at)infopac(dot)ru> wrote:
> Hello!
>
> I have table like
>
> CREATE TABLE stats
> (
> username varchar(256) NOT NULL,
> "time" int8 NOT NULL,
> duration int4 NOT NULL,
> phonenumber varchar(20) NOT NULL,
> and so on ...
> )
>
> I have function like
>
> CREATE OR REPLACE FUNCTION auth("varchar", "varchar")
> RETURNS bool AS '
> ...
> ' LANGUAGE 'plperlu' VOLATILE;
>
> where first argument is username and second is password. This function
> returns true if username and password validated successfully or false
> otherwise.
>
> I have a user which must do only selects from table "stats".
>
> My questions is how to restrict access on table "stats" to this user
> in way where this user will be able to select only limited set of
> columns from table "stats" and only rows with usernames for which
> this user knows correct passwords validated via auth() function call?
>
> Any help will be appreciated.
> --
> Vladimir A. Petrov (aka vap) phone: (+7 8482)
> 420069 Infopac JSC. Head of the exploitation department.
> http://infopac.ru
> _______________________________________________________________________
> ^[:wq ...sed libera nos a
> malo.
>
>
>
> ---------------------------(end of
> broadcast)--------------------------- TIP 2: Don't 'kill -9' the
> postmaster
--
The time is right to make new friends.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-07-11 13:06:51 | Re: How to restrict select from table with external |
Previous Message | Sean Davis | 2006-07-11 11:47:58 | Re: How to restrict select from table with external validation? |