pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Petr Kavan <petr.kavan@marekmicro.cz>
To: pgsql-performance@postgresql.org
Subject: How many views is ok?
Date: Fri, 12 Aug 2005 08:53:33 +0200
Message-ID: <001a01c59f0a$8e8d9560$de01a8c0@kavan> (raw)

I have database of company data, and some of them is table of information 
about employees. I need each employee to have access only to his own row. 
Postgre cannot do this by system of privileges, because that can give 
privileges only to whole tables.

Possibility is to create a view for each employee that chooses only his data 
and give employee privileges to this view. But I am not sure if such number 
of views does not have some performance drawbacks or even if postgre can 
support it (I expect i can). I would need several tables protected like this 
and it can result in, say 1000 views in maximum.

Because access to DB will go through PHP information system, other 
possibility to protect data is to let IS connect as more privileged than 
user really is, but let it retrieve only data for that user.

View-approach seems far more clear than this, but im not sure if postgre can 
handle it without problems.

Thanks for any reply :-)

-----------------------------------------------------------
Petr Kavan
Database Development





view thread (4+ messages)  latest in thread

Message-ID: <001a01c59f0a$8e8d9560$de01a8c0@kavan>
Permalink:  ../001a01c59f0a$8e8d9560$de01a8c0@kavan/
Also on:    postgresql.org/message-id/001a01c59f0a$8e8d9560$de01a8c0@kavan

 · 

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-performance@postgresql.org
  Cc: petr.kavan@marekmicro.cz
  Subject: Re: How many views is ok?
  In-Reply-To: <001a01c59f0a$8e8d9560$de01a8c0@kavan>

* 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