Re: How many views is ok?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Petr Kavan" <petr(dot)kavan(at)marekmicro(dot)cz>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: How many views is ok?
Date: 2005-08-15 00:38:00
Message-ID: 5059.1124066280@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Petr Kavan" <petr(dot)kavan(at)marekmicro(dot)cz> writes:
> 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).

Do you really need more than one view? I'd consider something like

create view emp_view as select * from emp where name = current_user;

This requires that your Postgres usernames match up with something in
the underlying table, of course.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Steinar H. Gunderson 2005-08-15 01:01:59 Re: Performance pb vs SQLServer.
Previous Message John Arbash Meinel 2005-08-15 00:27:38 Re: Performance pb vs SQLServer.