From bd1ad1b019cda851a3e925133c056930368e6424 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 25 Jan 2011 17:51:59 -0500 Subject: Replace pg_class.relhasexclusion with pg_index.indisexclusion. There isn't any need to track this state on a table-wide basis, and trying to do so introduces undesirable semantic fuzziness. Move the flag to pg_index, where it clearly describes just a single index and can be immutable after index creation. --- src/backend/commands/vacuum.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'src/backend/commands') diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index 9098c5d5c6f..56637116745 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -524,21 +524,12 @@ vac_update_relstats(Relation relation, /* * If we have discovered that there are no indexes, then there's no - * primary key either, nor any exclusion constraints. This could be done - * more thoroughly... + * primary key either. This could be done more thoroughly... */ - if (!hasindex) + if (pgcform->relhaspkey && !hasindex) { - if (pgcform->relhaspkey) - { - pgcform->relhaspkey = false; - dirty = true; - } - if (pgcform->relhasexclusion && pgcform->relkind != RELKIND_INDEX) - { - pgcform->relhasexclusion = false; - dirty = true; - } + pgcform->relhaspkey = false; + dirty = true; } /* We also clear relhasrules and relhastriggers if needed */ -- cgit v1.2.3