Nested tables - Mailing list pgsql-general

From Jason Vasquez
Subject Nested tables
Date
Msg-id 05256897.007914E1.00@aammta1.d51.lilly.com
Whole thread Raw
Responses Re: [GENERAL] Nested tables
List pgsql-general

I've looked through the documentation, but I've not found anything that
addresses this situation. Is this possible with PostgreSQL?  Or maybe there is
a better way to accomplish what I want to do?

Basically, I'd like to set up an ACL-like property for each record. A table
could be strucured like this:

Table ACL:
   Attribute   |    Type     |          Modifier
---------------+-------------+----------------------------
 uniqid        | varchar(12) | not null
 date_created  | timestamp   | not null
 date_modified | timestamp   | not null
 read          | boolean     | not null default 'f'::bool
 write         | boolean     | not null default 'f'::bool
 execute       | boolean     | not null default 'f'::bool
 delete        | boolean     | not null default 'f'::bool


Table myItem:
   Attribute    |    Type     | Modifier
----------------+-------------+----------
 uniqid         | varchar(12) | not null
 date_created   | timestamp   | not null
 date_modified  | timestamp   | not null
 author         | text        | not null
 title          | text        | not null
 access_control | acl         | not null


PostgreSQL lets me create the class myItem with a "acl" field type, but I
can't figure out how to insert multiple values (or any values!) into the
access_control field...

Thanks,
Jason



pgsql-general by date:

Previous
From: "Oliver Elphick"
Date:
Subject: Re: [GENERAL] FOREIGN KEY syntax
Next
From: Ed Loehr
Date:
Subject: Re: [GENERAL] database corruption?