1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-27 23:21:58 +03:00

Allow reloption names to have qualifiers, initially supporting a TOAST

qualifier, and add support for this in pg_dump.

This allows TOAST tables to have user-defined fillfactor, and will also
enable us to move the autovacuum parameters to reloptions without taking
away the possibility of setting values for TOAST tables.
This commit is contained in:
Alvaro Herrera
2009-02-02 19:31:40 +00:00
parent 80f95a6500
commit 3a5b773715
27 changed files with 455 additions and 130 deletions

View File

@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.321 2009/01/22 20:16:03 tgl Exp $
* $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.322 2009/02/02 19:31:39 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@ -2832,6 +2832,7 @@ OpenIntoRel(QueryDesc *queryDesc)
Oid intoRelationId;
TupleDesc tupdesc;
DR_intorel *myState;
static char *validnsps[] = HEAP_RELOPT_NAMESPACES;
Assert(into);
@ -2890,6 +2891,8 @@ OpenIntoRel(QueryDesc *queryDesc)
/* Parse and validate any reloptions */
reloptions = transformRelOptions((Datum) 0,
into->options,
NULL,
validnsps,
true,
false);
(void) heap_reloptions(RELKIND_RELATION, reloptions, true);
@ -2926,7 +2929,16 @@ OpenIntoRel(QueryDesc *queryDesc)
* AlterTableCreateToastTable ends with CommandCounterIncrement(), so that
* the TOAST table will be visible for insertion.
*/
AlterTableCreateToastTable(intoRelationId);
reloptions = transformRelOptions((Datum) 0,
into->options,
"toast",
validnsps,
true,
false);
(void) heap_reloptions(RELKIND_TOASTVALUE, reloptions, true);
AlterTableCreateToastTable(intoRelationId, reloptions);
/*
* And open the constructed table for writing.