Re: BUG #4238: pg_class.relhasindex not updated by vacuum - Mailing list pgsql-bugs

From Lawrence Cohan
Subject Re: BUG #4238: pg_class.relhasindex not updated by vacuum
Date
Msg-id D125F8AF679AEE4390F3A546AFFA5CB00331A3DD@hermes.1shoppingcart.lan
Whole thread Raw
In response to Re: BUG #4238: pg_class.relhasindex not updated by vacuum  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@sss.pgh.pa.us]=20
Sent: Friday, June 13, 2008 1:13 PM
To: Alvaro Herrera
Cc: Lawrence Cohan; pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #4238: pg_class.relhasindex not updated by
vacuum=20

Alvaro Herrera <alvherre@commandprompt.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 on=
ly for the person or entity to which it is addressed and may =0D
contain confidential and/or privileged material.  Any review, retransmissio=
n, dissemination or other use of, or taking of any action in =0D
reliance upon, this information by persons or entities other than the inten=
ded recipient is prohibited. If you received this in error, please =0D
contact the sender and delete the material from any system and destroy any =
copies.

pgsql-bugs by date:

Previous
From: "Lawrence Cohan"
Date:
Subject: Re: BUG #4238: pg_class.relhasindex not updated by vacuum
Next
From: Tom Lane
Date:
Subject: Re: Bug in select to_char(now(), 'YYYY/MM/DD HH24:MI:SS:MS')