Inheritance: Performance & Indexes

From: Itai Zukerman <zukerman(at)math-hat(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Inheritance: Performance & Indexes
Date: 2001-06-18 14:30:39
Message-ID: 87k829zwq8.fsf@matt.w80.math-hat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Just curious:

create table a (x int4 primary key);
create table a1 () inherits (a);

[...]

delete from a where x = 1000;

I take it that this is equivalent to:

delete from only a where x = 1000;
delete from only a1 where x = 1000;

In particular, for performance reasons I should try to limit the
delete to a1 wherever possible?

Also, it looks like a1 doesn't inherit the primary key index. Is that
intentional or a bug?

Finally, is it possible to specify that x values be unique across
both a *and* a1, without triggers?

--
Itai Zukerman <http://www.math-hat.com/~zukerman/>

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Ilan Fait 2001-06-18 14:35:42 How to build a TRIGGER in POSTGERSQL
Previous Message Tom Lane 2001-06-18 14:21:52 Re: casts and conversions