From: | Olivier PRENANT <ohp(at)pyrenet(dot)fr> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Arrays how to... |
Date: | 2000-07-27 11:00:04 |
Message-ID: | Pine.UW2.4.21.0007271252470.22019-100000@server.pyrenet.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi all,
I'm banging my head over this one:
I want to set a table like this:
CREATE TABLE readers (
name varchar not null primary key,
documents int[]);
where name is the name of a reader and documents a list of documents he
can access.
So it's easy to say: hi, you're authorized to read his, this and this.
Now I want to know who can read document x (there can be sevral readers
for a single doc)
I also want to put referencial integrity in that each document listed has
to be in a documents table.
How can I do that?
Maybe the simplest solution is one row per reader/document.
Any clues?
--
Olivier PRENANT Tel: +33-5-61-50-97-00 (Work)
Quartier d'Harraud Turrou +33-5-61-50-97-01 (Fax)
31190 AUTERIVE +33-6-07-63-80-64 (GSM)
FRANCE Email: ohp(at)pyrenet(dot)fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2000-07-27 13:00:25 | Re: mac.c |
Previous Message | Hiroshi Inoue | 2000-07-27 10:30:08 | RE: AW: Vacuum only with 20% old tuples |