Re: BUG #4238: pg_class.relhasindex not updated by vacuum

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Lawrence Cohan <lawrencec(at)1shoppingcart(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4238: pg_class.relhasindex not updated by vacuum
Date: 2008-06-13 17:12:41
Message-ID: 12939.1213377161@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Lawrence Cohan wrote:
>> In that case the two separate pg_class relhasindex and relhaspkey would
>> make sense indeed - just a thought nothing else and we'll take it as is.

> What would be the point? If you want to figure out whether a table has
> a primary key, you can query the catalogs.

Note that UNIQUE constraints are implemented by indexes too, so it's not
clear to me that special-casing the pkey would really respond to this
criticism anyway.

But the bottom line is that relhasindex is defined in terms of
possessing physical indexes, not whether those indexes arose from
constraint syntax or CREATE INDEX.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Lawrence Cohan 2008-06-13 17:17:58 Re: BUG #4238: pg_class.relhasindex not updated by vacuum
Previous Message Lawrence Cohan 2008-06-13 17:03:27 Re: BUG #4238: pg_class.relhasindex not updated by vacuum