Re: duplicates on primary key column - Mailing list pgsql-novice

From Marcin Gil
Subject Re: duplicates on primary key column
Date
Msg-id 3FE864AB.7080600@audax.com.pl
Whole thread Raw
In response to Re: duplicates on primary key column  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: duplicates on primary key column
List pgsql-novice
>>Tom Lane wrote:
>>
> That's because you made "archives" inherit from "documents", so the scan
> includes the rows in "archives" that have docid=0.
>
I see. That's my first time with inheriting tables. I though that it
would be something as C++, ie. structure inherit only.

> You could do "SELECT docid FROM ONLY documents" if you don't want the
> scan to include child tables.  But it's probably a bad idea to use
> inheritance for the archives table at all.
>
Why it's a bad idea? Some pointing out or links would be very
helpful.

Thanks for your kindness!
--
   Marcin Gil :: marcin.gil@audax.com.pl
   OIS Audax Sp. z o.o., ul. Barlickiego 4, 97-200 Tomaszów Mazowiecki
   tel (44) 7247530 w/22, 7244401 w/22 -- fax w/25

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: duplicates on primary key column
Next
From: Tom Lane
Date:
Subject: Re: duplicates on primary key column