Access rescrictions
Access rescrictions
От:
Elmar.Haneke@gmx.de
Дата:
Hello, I'm looking for an solution to restrict the access to show an part of an Table only: In an customer-database it should be possible to list the bills of an certain customer, but it should be restricted to generate/summarize a list of all bills. "SELECT * FROM Bills" should be restricted "SELECT * FROM Bills WHERE CustomerID=?" should be allowed for any CustomerID. Is there an solution to this problem in PostgreSQL? Elmar
Re: [GENERAL] Access rescrictions
От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
On 1999-12-14, Elmar.Haneke@gmx.de mentioned: > I'm looking for an solution to restrict the access to show an part of an Table only: > In an customer-database it should be possible to list the bills of an certain customer, > but it should be restricted to generate/summarize a list of all bills. > > "SELECT * FROM Bills" should be restricted > "SELECT * FROM Bills WHERE CustomerID=?" should be allowed for any CustomerID. > > Is there an solution to this problem in PostgreSQL? No. I think hardly any database engine will be able to restrict access according to query semantics. You will have to do this via your client application. -- Peter Eisentraut Sernanders väg 10:115 peter_e@gmx.net 75262 Uppsala http://yi.org/peter-e/ Sweden
RE: [GENERAL] Access rescrictions
От:
"Vince DiCiero" <vdiciero@home.com>
Дата:
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 BillsCustomerID001 give Customer 002 access to BillsCustomerID002 etc. Would this solve your problem ? Vince > -----Original Message----- > From: owner-pgsql-general@postgreSQL.org > [mailto:owner-pgsql-general@postgreSQL.org]On Behalf Of Peter > Eisentraut > Sent: Tuesday, December 14, 1999 5:02 PM > To: Elmar.Haneke@gmx.de > Cc: pgsql-general@postgreSQL.org > Subject: Re: [GENERAL] Access rescrictions > > > On 1999-12-14, Elmar.Haneke@gmx.de mentioned: > > > I'm looking for an solution to restrict the access to show > an part of an Table only: > > In an customer-database it should be possible to list the > bills of an certain customer, > > but it should be restricted to generate/summarize a list of > all bills. > > > > "SELECT * FROM Bills" should be restricted > > "SELECT * FROM Bills WHERE CustomerID=?" should be allowed > for any CustomerID. > > > > Is there an solution to this problem in PostgreSQL? > > No. I think hardly any database engine will be able to restrict access > according to query semantics. You will have to do this via your client > application. > > -- > Peter Eisentraut Sernanders väg 10:115 > peter_e@gmx.net 75262 Uppsala > http://yi.org/peter-e/ Sweden > > > > ************ >