>
>
>
>The way that we have overcome the problem is so:
>
>create table a (id bigserial, ...., primary key(id));
>
>create table b (id bigserial, ..., primary key(id)) inherits (a);
>
>
I doubt this really overcomes the problem (at least, not the one,
mentioned in the original post, and not the way I would call useful for
real OO inheritance).
For example:
create table a (id int primary key, name text);
create table b (id int primary key, last_name text);
insert into a values (1, 'dima');
insert into b values (1, 'dima', 'tkach');
select * from a;
id | name
----+------
1 | dima
1 | dima
Now, what kind of 'primary key' is this???
Dima
>This means that you will always have a unique key in the inherited table
>as it 'replaces' the original id.
>
>Does this answer the question or am I off the mark?
>
>Jake
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>