From: brent wood <brent.wood@blazemail.com>
To: pgsql-sql@postgresql.org
Subject: Re: [GENERAL] Access rescrictions
Date: Thu, 16 Dec 1999 06:39:00 +1300
Message-ID: <1D5DF7B2BD2B3D1178B20005B823626F@brent.wood.blazemail.com> (raw)
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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: brent.wood@blazemail.com
Subject: Re: [GENERAL] Access rescrictions
In-Reply-To: <1D5DF7B2BD2B3D1178B20005B823626F@brent.wood.blazemail.com>
References: <1D5DF7B2BD2B3D1178B20005B823626F@brent.wood.blazemail.com>
* 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