Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf24c509

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 parenta3704d3 commitf24c509

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-standalonecomposite 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
elseif (att_typtype=='c')
439439
{
440-
#if0
441440
Oidtyprelid=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)

[8]ページ先頭

©2009-2025 Movatter.jp