Table Inheritence and Partioning - Mailing list pgsql-performance

From
Subject Table Inheritence and Partioning
Date
Msg-id 47230CE166B64744B0120173E4C2161EED8457@BLR-EC-MBX01.wipro.com
Whole thread Raw
Responses Re: Table Inheritence and Partioning  (Albert Cervera Areny <albert@sedifa.com>)
Re: Table Inheritence and Partioning  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-performance
Hi,
 
We are having 3 tables;
1. persons <-- Base table and no data will be inserted in this table.
2. Person1 <-- Inherited table from persons all data will be inserted in this table.
3. PersonalInfo  <-- which is storing all personal information of the persons and is having the foreign key relationship with the persons table.
 
When we try to insert the data in the personalInfo table it is throwing the error stating the primary key does not contain the given value.   But, if I try to select from the persons table it is showing the records from its inherited tables as well.     Can anybody tell me what might be the problem here?   Or else any help regarding the same will be of very much help.
 
Following is the table structure;
---------------------------------------------------------------------
Create Table persons (
name varchar,
age int,
dob varchar,
constraint pKey primary key(name)
);
 create table person1 ( ) inherits(persons);
 
Create table personalInfo (
name varchar,
contact_id int,
contact_addr varchar,
constraint cKey primary key(contact_id),
constraint fKey foreign key(name) references persons(name)
);
--------------------------------------------------------------------------------------------------
 
Thanks In Advance,
Ramachandra B.S.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

pgsql-performance by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Table Size
Next
From: Albert Cervera Areny
Date:
Subject: Re: Table Inheritence and Partioning