Received: from mailgw2.prontomail.com (mailgw2.prontomail.com [209.185.149.198]) by hub.org (8.9.3/8.9.3) with ESMTP id NAA63767 for ; Wed, 15 Dec 1999 13:05:45 -0500 (EST) (envelope-from brent.wood@blazemail.com) Received: from prontomail13.prontomail.com (209.185.149.113) by mailgw2.prontomail.com (NPlex 2.0.123) for pgsql-sql@postgresql.org; Wed, 15 Dec 1999 09:58:21 -0800 Received: from web33 (209.185.149.233) by prontomail13.prontomail.com (NPlex 2.0.123) for pgsql-sql@postgresql.org; Wed, 15 Dec 1999 09:59:51 -0800 From: "brent wood" Message-Id: <1D5DF7B2BD2B3D1178B20005B823626F@brent.wood.blazemail.com> Date: Thu, 16 Dec 1999 06:39:00 +1300 X-Priority: Normal Content-Type: text/plain; charset=ISO-8859-1 To: pgsql-sql@postgresql.org Subject: Re: [GENERAL] Access rescrictions X-Mailer: Web Based Pronto Mime-Version: 1.0 Content-Transfer-Encoding: 7bit I'd be comfortable with this solution for a few customers, but if you have a few thousand then admin/maintenance becomes a problem. I'm new to PostgreSQL (very) but I'd have thought a short bit of C with embedded SQL or Perl code could be 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 to the 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 BillsCustomerID001 give Customer 002 access to BillsCustomerID002 etc. ------------------------- Get your own Free E-mail! http://www.blazemail.com