diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-04-22 21:56:06 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-04-22 21:56:06 +0000 |
commit | 5dd1c713d063eb949039254f10defdc0c7d5f66d (patch) | |
tree | d4ccf41a8aa5d678a09766edacdbd968cc2988f8 /src/backend/commands/tablecmds.c | |
parent | 3faf224acea642ce1a536d84a6f2d8e426387449 (diff) | |
download | postgresql-5dd1c713d063eb949039254f10defdc0c7d5f66d.tar.gz postgresql-5dd1c713d063eb949039254f10defdc0c7d5f66d.zip |
Oops, forgot we had a macro to encapsulate test for type toastability.
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 49170afd5cb..c554bba4be3 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.6 2002/04/22 21:46:11 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.7 2002/04/22 21:56:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -888,10 +888,9 @@ AlterTableAlterColumnFlags(Oid myrelid, { /* * safety check: do not allow toasted storage modes unless column - * datatype is TOAST-aware. We assume the datatype's typstorage - * will be 'p' if and only if it ain't TOAST-aware. + * datatype is TOAST-aware. */ - if (newstorage == 'p' || get_typstorage(attrtuple->atttypid) != 'p') + if (newstorage == 'p' || TypeIsToastable(attrtuple->atttypid)) attrtuple->attstorage = newstorage; else elog(ERROR, "ALTER TABLE: Column datatype %s can only have storage \"plain\"", |