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



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to