*
*
* 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
* (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,
}
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",
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.302 2004/05/30 23:40:32 neilc Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.303 2004/06/04 03:24:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
static void
transformColumnType(ParseState *pstate, ColumnDef *column)
{
- TypeName *typename = column->typename;
- Type ctype = typenameType(typename);
-
/*
- * Is this the name of a complex type? If so, implement it as a set.
- *
- * XXX this is a hangover from ancient Berkeley code that probably
- * doesn't work anymore anyway.
+ * All we really need to do here is verify that the type is valid.
*/
- if (typeTypeRelid(ctype) != InvalidOid)
- {
- /*
- * (Eventually add in here that the set can only contain one
- * element.)
- */
- typename->setof = true;
- }
+ Type ctype = typenameType(column->typename);
ReleaseSysCache(ctype);
}