aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-06-06 04:52:55 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-06-06 04:52:55 +0000
commitf24c5098fdcdfcd7b141b96c7cff16ccc2164e3c (patch)
tree047e47abf649ddd41dfccffbc82f7f1353b99f82
parenta3704d3deca6d08013a6b1db0432b75dc6b78d28 (diff)
downloadpostgresql-f24c5098fdcdfcd7b141b96c7cff16ccc2164e3c.tar.gz
postgresql-f24c5098fdcdfcd7b141b96c7cff16ccc2164e3c.zip
Remove finger from dike: composite types are now allowed as table columns.
Still a few things to do, like binary I/O and regression tests and docs, but might as well let people play with the toy.
-rw-r--r--src/backend/catalog/heap.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c
index a5076fece74..3ad99c81087 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.267 2004/06/04 03:24:04 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.268 2004/06/06 04:52:55 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
- * composite type. (Eventually we would like to allow standalone
- * composite types, but that needs some nontrivial work yet,
- * particularly TOAST support.)
+ * non-standalone composite type. (We could support using table rowtypes
+ * as attributes, if we were willing to make ALTER TABLE hugely more
+ * complex, but for now let's limit the damage ...)
*/
if (atttypid == UNKNOWNOID)
ereport(WARNING,
@@ -437,11 +437,9 @@ 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)
-#endif
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
errmsg("column \"%s\" has composite type %s",