Re: duplicates on primary key column

From: Marcin Gil <marcin(dot)gil(at)audax(dot)com(dot)pl>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: duplicates on primary key column
Date: 2003-12-23 15:52:11
Message-ID: 3FE864AB.7080600@audax.com.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)gil(at)audax(dot)com(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2003-12-23 16:05:05 Re: duplicates on primary key column
Previous Message Tom Lane 2003-12-23 15:43:48 Re: duplicates on primary key column