Re: BUG #3723: dropping an index that doesn't refer to table's columns - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3723: dropping an index that doesn't refer to table's columns
Date
Msg-id 18640.1194358905@sss.pgh.pa.us
Whole thread Raw
In response to BUG #3723: dropping an index that doesn't refer to table's columns  ("Sam Mason" <sam@samason.me.uk>)
Responses Re: BUG #3723: dropping an index that doesn't refer to table's columns  (Heikki Linnakangas <heikki@enterprisedb.com>)
List pgsql-bugs
"Sam Mason" <sam@samason.me.uk> writes:
> I've just discovered that an index that doesn't refer to any of its table's
> columns isn't automatically dropped when its table is.

A straightforward solution would be to ban such "indexes".

> p.s. the reason for creating this strange index was to ensure that a maximum
> of one row was inserted into the table---I can do this different ways for
> now.

Please explain how you thought it would help you do that, because
without some evidence that there's a use-case, I'm inclined to fix it
as above ...

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Henning Nitschke"
Date:
Subject: BUG #3722: PSQLWarning missing call to super in CTOR
Next
From: Heikki Linnakangas
Date:
Subject: Re: BUG #3723: dropping an index that doesn't refer to table's columns