aboutsummaryrefslogtreecommitdiff
path: root/src/backend/catalog/heap.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-06-04 03:24:04 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-06-04 03:24:04 +0000
commit223b813d0ef76eebcb74f405cb77ed8855b37f4b (patch)
treeebbcdcfc0269ea9c350d0f9460abbea885f16c57 /src/backend/catalog/heap.c
parent7eb2ff799e0bfcc59d160964f0aafed4901db4ba (diff)
downloadpostgresql-223b813d0ef76eebcb74f405cb77ed8855b37f4b.tar.gz
postgresql-223b813d0ef76eebcb74f405cb77ed8855b37f4b.zip
Remove some long-obsolete code that was causing a strange error message
when someone attempts to create a column of a composite datatype. For now, just make sure we produce a reasonable error at the 'right place'. Not sure if this will be made to work before 7.5, but make it act reasonably in case nothing more gets done.
Diffstat (limited to 'src/backend/catalog/heap.c')
-rw-r--r--src/backend/catalog/heap.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c
index d67d6205311..a5076fece74 100644
--- a/src/backend/catalog/heap.c
+++ b/src/backend/catalog/heap.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.266 2004/05/31 19:24:05 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.267 2004/06/04 03:24:04 tgl Exp $
*
*
* INTERFACE ROUTINES
@@ -417,9 +417,9 @@ CheckAttributeType(const char *attname, Oid atttypid)
* (usually as a result of a 'retrieve into' - jolly)
*
* Refuse any attempt to create a pseudo-type column or one that uses a
- * standalone composite type. (Eventually we should probably refuse
- * all references to complex types, but for now there's still some
- * Berkeley-derived code that thinks it can do this...)
+ * composite type. (Eventually we would like to allow standalone
+ * composite types, but that needs some nontrivial work yet,
+ * particularly TOAST support.)
*/
if (atttypid == UNKNOWNOID)
ereport(WARNING,
@@ -437,9 +437,11 @@ CheckAttributeType(const char *attname, Oid atttypid)
}
else if (att_typtype == 'c')
{
+#if 0
Oid typrelid = get_typ_typrelid(atttypid);
- if (get_rel_relkind(typrelid) == RELKIND_COMPOSITE_TYPE)
+ if (get_rel_relkind(typrelid) != RELKIND_COMPOSITE_TYPE)
+#endif
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("column \"%s\" has composite type %s",