Hello Erik,
On 3/18/08, Erik Jones <erik@myemma.com> wrote:
> Table partitioning is normally implemented via table inheritance and
> you are free to add more, and different, columns to the "child" tables.
>
> Observe:
>
> CREATE SEQUENCE part_seq;
> CREATE TABLE parent (
> id integer PRIMARY KEY DEFAULT nextval('part_seq'),
> foo text
> );
>
> CREATE TABLE child1 (
> bar text,
> CHECK(foo='some_type1'),
> PRIMARY KEY (id)
> ) INHERITS (parent);
>
> CREATE TABLE child2 (
> baz text,
> CHECK(foo='some_type2'),
> PRIMARY KEY (id)
> ) INHERITS (parent);
>
> Now, both child1 and child2 have id and foo fields, child1 will only
> allow entries with foo='some_type1', child2 will only allow entries
> with foo='some_type2', and both children have extra fields that
> weren't present in the parent.
Ah, silly that I failed to understand that.
Thanks a lot for your response (Alban too) -- I can see table
partitioning solving my problem.
--
Leon Mergen
http://www.solatis.com