Skip to content

Commit 5dd1c71

Browse files
committed
Oops, forgot we had a macro to encapsulate test for type toastability.
1 parent 3faf224 commit 5dd1c71

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/backend/commands/tablecmds.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* 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 $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -888,10 +888,9 @@ AlterTableAlterColumnFlags(Oid myrelid,
888888
{
889889
/*
890890
* 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.
893892
*/
894-
if (newstorage == 'p' || get_typstorage(attrtuple->atttypid) != 'p')
893+
if (newstorage == 'p' || TypeIsToastable(attrtuple->atttypid))
895894
attrtuple->attstorage = newstorage;
896895
else
897896
elog(ERROR, "ALTER TABLE: Column datatype %s can only have storage \"plain\"",

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