|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.6 2002/04/22 21:46:11 tgl Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.7 2002/04/22 21:56:06 tgl Exp $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -888,10 +888,9 @@ AlterTableAlterColumnFlags(Oid myrelid,
|
888 | 888 | {
|
889 | 889 | /*
|
890 | 890 | * safety check: do not allow toasted storage modes unless column
|
891 |
| - * datatype is TOAST-aware. We assume the datatype's typstorage |
892 |
| - * will be 'p' if and only if it ain't TOAST-aware. |
| 891 | + * datatype is TOAST-aware. |
893 | 892 | */
|
894 |
| -if (newstorage=='p'||get_typstorage(attrtuple->atttypid)!='p') |
| 893 | +if (newstorage=='p'||TypeIsToastable(attrtuple->atttypid)) |
895 | 894 | attrtuple->attstorage=newstorage;
|
896 | 895 | else
|
897 | 896 | elog(ERROR,"ALTER TABLE: Column datatype %s can only have storage \"plain\"",
|
|