*** pgsql/src/backend/tcop/utility.c 2009/01/22 20:16:06 1.305 --- pgsql/src/backend/tcop/utility.c 2009/02/02 19:31:39 1.306 *************** *** 10,21 **** * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.304 2009/01/01 17:23:48 momjian Exp $ * *------------------------------------------------------------------------- */ #include "postgres.h" #include "access/twophase.h" #include "access/xact.h" #include "catalog/catalog.h" --- 10,22 ---- * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.305 2009/01/22 20:16:06 tgl Exp $ * *------------------------------------------------------------------------- */ #include "postgres.h" + #include "access/reloptions.h" #include "access/twophase.h" #include "access/xact.h" #include "catalog/catalog.h" *************** ProcessUtility(Node *parsetree, *** 422,427 **** --- 423,431 ---- if (IsA(stmt, CreateStmt)) { + Datum toast_options; + static char *validnsps[] = HEAP_RELOPT_NAMESPACES; + /* Create the table itself */ relOid = DefineRelation((CreateStmt *) stmt, RELKIND_RELATION); *************** ProcessUtility(Node *parsetree, *** 431,437 **** * needs a secondary relation too. */ CommandCounterIncrement(); ! AlterTableCreateToastTable(relOid); } else { --- 435,451 ---- * needs a secondary relation too. */ CommandCounterIncrement(); ! ! /* parse and validate reloptions for the toast table */ ! toast_options = transformRelOptions((Datum) 0, ! ((CreateStmt *)stmt)->options, ! "toast", ! validnsps, ! true, false); ! (void) heap_reloptions(RELKIND_TOASTVALUE, toast_options, ! true); ! ! AlterTableCreateToastTable(relOid, toast_options); } else {