diff options
author | Jan Wieck <JanWieck@Yahoo.com> | 2000-07-05 12:45:31 +0000 |
---|---|---|
committer | Jan Wieck <JanWieck@Yahoo.com> | 2000-07-05 12:45:31 +0000 |
commit | 030962da262d9238a83b3d70a1720acdcf3efaea (patch) | |
tree | a703f9d3095aaa321a133685cf93fb2889f44e71 /src/backend/tcop/utility.c | |
parent | f2dfd5616c64ca7180964190fd600efe4bc69cfa (diff) | |
download | postgresql-030962da262d9238a83b3d70a1720acdcf3efaea.tar.gz postgresql-030962da262d9238a83b3d70a1720acdcf3efaea.zip |
Bugfix in ALTER TABLE CREATE TOAST TABLE
Automatically create toast table at CREATE TABLE if new table
has toastable attributes.
Jan
Diffstat (limited to 'src/backend/tcop/utility.c')
-rw-r--r-- | src/backend/tcop/utility.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 17c77da8504..409aca70ada 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.90 2000/07/03 23:09:46 wieck Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.91 2000/07/05 12:45:26 wieck Exp $ * *------------------------------------------------------------------------- */ @@ -159,6 +159,15 @@ ProcessUtility(Node *parsetree, CHECK_IF_ABORTED(); DefineRelation((CreateStmt *) parsetree, RELKIND_RELATION); + + /* + * Let AlterTableCreateToastTable decide if this + * one needs a secondary relation too. + * + */ + CommandCounterIncrement(); + AlterTableCreateToastTable(((CreateStmt *)parsetree)->relname, + true); break; case T_DropStmt: @@ -361,7 +370,7 @@ ProcessUtility(Node *parsetree, AlterTableDropConstraint(stmt->relname, stmt->inh, stmt->name, stmt->behavior); break; case 'E': /* CREATE TOAST TABLE */ - AlterTableCreateToastTable(stmt->relname); + AlterTableCreateToastTable(stmt->relname, false); break; default: /* oops */ elog(ERROR, "T_AlterTableStmt: unknown subtype"); |