File tree 2 files changed +10
-21
lines changed
2 files changed +10
-21
lines changed Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.266 2004/05/31 19 :24:05 tgl Exp $
11
+ * $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.267 2004/06/04 03 :24:04 tgl Exp $
12
12
*
13
13
*
14
14
* INTERFACE ROUTINES
@@ -417,9 +417,9 @@ CheckAttributeType(const char *attname, Oid atttypid)
417
417
* (usually as a result of a 'retrieve into' - jolly)
418
418
*
419
419
* Refuse any attempt to create a pseudo-type column or one that uses a
420
- * standalone composite type. (Eventually we should probably refuse
421
- * all references to complex types, but for now there's still some
422
- * Berkeley-derived code that thinks it can do this.. .)
420
+ * composite type. (Eventually we would like to allow standalone
421
+ * composite types, but that needs some nontrivial work yet,
422
+ * particularly TOAST support .)
423
423
*/
424
424
if (atttypid == UNKNOWNOID )
425
425
ereport (WARNING ,
@@ -437,9 +437,11 @@ CheckAttributeType(const char *attname, Oid atttypid)
437
437
}
438
438
else if (att_typtype == 'c' )
439
439
{
440
+ #if 0
440
441
Oid typrelid = get_typ_typrelid (atttypid );
441
442
442
- if (get_rel_relkind (typrelid ) == RELKIND_COMPOSITE_TYPE )
443
+ if (get_rel_relkind (typrelid ) != RELKIND_COMPOSITE_TYPE )
444
+ #endif
443
445
ereport (ERROR ,
444
446
(errcode (ERRCODE_INVALID_TABLE_DEFINITION ),
445
447
errmsg ("column \"%s\" has composite type %s" ,
Original file line number Diff line number Diff line change 6
6
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
7
7
* Portions Copyright (c) 1994, Regents of the University of California
8
8
*
9
- * $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.302 2004/05/30 23:40:32 neilc Exp $
9
+ * $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.303 2004/06/04 03:24:04 tgl Exp $
10
10
*
11
11
*-------------------------------------------------------------------------
12
12
*/
@@ -3049,23 +3049,10 @@ makeFromExpr(List *fromlist, Node *quals)
3049
3049
static void
3050
3050
transformColumnType (ParseState * pstate , ColumnDef * column )
3051
3051
{
3052
- TypeName * typename = column -> typename ;
3053
- Type ctype = typenameType (typename );
3054
-
3055
3052
/*
3056
- * Is this the name of a complex type? If so, implement it as a set.
3057
- *
3058
- * XXX this is a hangover from ancient Berkeley code that probably
3059
- * doesn't work anymore anyway.
3053
+ * All we really need to do here is verify that the type is valid.
3060
3054
*/
3061
- if (typeTypeRelid (ctype ) != InvalidOid )
3062
- {
3063
- /*
3064
- * (Eventually add in here that the set can only contain one
3065
- * element.)
3066
- */
3067
- typename -> setof = true;
3068
- }
3055
+ Type ctype = typenameType (column -> typename );
3069
3056
3070
3057
ReleaseSysCache (ctype );
3071
3058
}
You can’t perform that action at this time.
0 commit comments