Skip to content

Commit f24c509

Browse files
committed
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.
1 parent a3704d3 commit f24c509

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/backend/catalog/heap.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.267 2004/06/04 03:24:04 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.268 2004/06/06 04:52:55 tgl Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -417,9 +417,9 @@ CheckAttributeType(const char *attname, Oid atttypid)
417417
* (usually as a result of a 'retrieve into' - jolly)
418418
*
419419
* Refuse any attempt to create a pseudo-type column or one that uses a
420-
* composite type. (Eventually we would like to allow standalone
421-
* composite types, but that needs some nontrivial work yet,
422-
* particularly TOAST support.)
420+
* non-standalone composite type. (We could support using table rowtypes
421+
* as attributes, if we were willing to make ALTER TABLE hugely more
422+
* complex, but for now let's limit the damage ...)
423423
*/
424424
if (atttypid == UNKNOWNOID)
425425
ereport(WARNING,
@@ -437,11 +437,9 @@ CheckAttributeType(const char *attname, Oid atttypid)
437437
}
438438
else if (att_typtype == 'c')
439439
{
440-
#if 0
441440
Oid typrelid = get_typ_typrelid(atttypid);
442441

443442
if (get_rel_relkind(typrelid) != RELKIND_COMPOSITE_TYPE)
444-
#endif
445443
ereport(ERROR,
446444
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
447445
errmsg("column \"%s\" has composite type %s",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy