Обсуждение: Re: [GENERAL] Access rescrictions

Поиск
Список
Период
Сортировка

Re: [GENERAL] Access rescrictions

От
"brent wood"
Дата:

I'd be comfortable with this solution for a few customers, but if you have a few thousand then admin/maintenance
becomesa problem. I'm new to PostgreSQL (very) but I'd have thought a short bit of C with embedded SQL or Perl code
couldbe run to create/drop such a view as a particular customer connected to the db? 
 

Even run the create view command from a file written by a shell script with script variables specifying the view name &
cust.ID to do the same thing?
 

Creating & dropping views is very low overhead, surely? & much tidier than keeping a permanent view for every user?

(I'll admit that this gives customers the right to create & drop views, but if this is a concern, run the create su'd
tothe dba) 
 

>---- Begin Original Message ----
>
>Couldn't you restrict access to the table
>and create views such as
>
>CREATE VIEW BillsCustomerID001 AS
>SELECT * FROM Bills WHERE CustomerID=001
>
>CREATE VIEW BillsCustomerID002 AS
>SELECT * FROM Bills WHERE CustomerID=002
>
>etc.
>
>and     give Customer 001 access to BillsCustomerID001give Customer 002 access to BillsCustomerID002etc.






-------------------------
Get your own Free E-mail!
http://www.blazemail.com