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

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

It is not criticism but only my own thought and PG is a really great
database!!! It was all perhaps due to my poor understanding of
relhasindex from pg_class internal catalog and I understand and respect
your view.

Best regards,
Lawrence Cohan.

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Friday, June 13, 2008 1:13 PM
To: Alvaro Herrera
Cc: Lawrence Cohan; pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #4238: pg_class.relhasindex not updated by
vacuum

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
Attention:
The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please
contact the sender and delete the material from any system and destroy any copies.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2008-06-15 02:41:15 Re: Bug in select to_char(now(), 'YYYY/MM/DD HH24:MI:SS:MS')
Previous Message Tom Lane 2008-06-13 17:12:41 Re: BUG #4238: pg_class.relhasindex not updated by vacuum