summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2012-10-24 17:39:37 +0000
committerTom Lane2012-10-24 17:39:37 +0000
commita4e8680a6c337955c021177457147f4b4d9a5df5 (patch)
treedc8d6dbb7a9ddaa04c300043483e62e8e9d4cd92 /src/include
parentf4c4335a4aaf5f2ee6e741cdf4f5c8e338d86a2f (diff)
When converting a table to a view, remove its system columns.
Views should not have any pg_attribute entries for system columns. However, we forgot to remove such entries when converting a table to a view. This could lead to crashes later on, if someone attempted to reference such a column, as reported by Kohei KaiGai. Patch in HEAD only. This bug has been there forever, but in the back branches we will have to defend against existing mis-converted views, so it doesn't seem worthwhile to change the conversion code too.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/heap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/catalog/heap.h b/src/include/catalog/heap.h
index 1465456cc7d..a35829bb7b9 100644
--- a/src/include/catalog/heap.h
+++ b/src/include/catalog/heap.h
@@ -107,6 +107,7 @@ extern Node *cookDefault(ParseState *pstate,
extern void DeleteRelationTuple(Oid relid);
extern void DeleteAttributeTuples(Oid relid);
+extern void DeleteSystemAttributeTuples(Oid relid);
extern void RemoveAttributeById(Oid relid, AttrNumber attnum);
extern void RemoveAttrDefault(Oid relid, AttrNumber attnum,
DropBehavior behavior, bool complain, bool internal);