From: | arie nugraha <dicarve(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: inheritance and table |
Date: | 2006-06-27 03:07:11 |
Message-ID: | 44A0A0DF.6020908@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Inheritance in postgre means you will have same fields definition
like the inherited table plus its own fields. So if table B is inherit
table A,
table B will have same field definition like A plus table B own
unique field(s).
It wont share primary keys, table B just have primary key in the same
field(s) like A
and records in table A wont be replaced by record(s) inserted to table B
or vice versa.
table A and table B basically a different entity, they just have same
fields definition.
Hope that will help you
> hi
>
> i don't have understand how works inheritance of tables...
>
> if table B inherits from table A
>
> - A and B must share primary keys?
>
> - if i isert record in B the record is replaced in A ?
>
> can i avoid this?
>
> i would like to have this scenario:
>
> table A
>
> table B inheridts from A
> table C inheridts from A
>
> if i insert a record in B it must be insered only in B!
> if i insert a record in C it must be insered only in C!
>
> is it possible?
>
> thanks
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2006-06-27 03:49:00 | Re: auto-vacuum & Negative "anl" Values |
Previous Message | Erik Jones | 2006-06-27 02:39:03 | Re: inheritance and table |