summaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2018-03-14 14:59:40 -0400
committerPeter Eisentraut <peter_e@gmx.net>2018-03-14 15:31:34 -0400
commitf66e8bf875f691db4c5d0173fc39b5a9c3ec969c (patch)
tree69ebd3ed87cd2b9e729ea5c9d0008844d1bdd7a6 /src/backend/commands
parent6b960aae90164cf85cf629e0af9286f97a9e51df (diff)
Remove pg_class.relhaspkey
It is not used for anything internally, and it cannot be relied on for external uses, so it can just be removed. To correct recommended way to check for a primary key is in pg_index. Discussion: https://www.postgresql.org/message-id/flat/b1a24c6c-6913-f89c-674e-0704f0ed69db@2ndquadrant.com
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/vacuum.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index b50c554c517..18b3966a1f7 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -909,16 +909,6 @@ vac_update_relstats(Relation relation,
dirty = true;
}
- /*
- * If we have discovered that there are no indexes, then there's no
- * primary key either. This could be done more thoroughly...
- */
- if (pgcform->relhaspkey && !hasindex)
- {
- pgcform->relhaspkey = false;
- dirty = true;
- }
-
/* We also clear relhasrules and relhastriggers if needed */
if (pgcform->relhasrules && relation->rd_rules == NULL)
{