From 3a5b77371522b64feda006a7aed2a0e57bfb2b22 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Mon, 2 Feb 2009 19:31:40 +0000 Subject: 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. --- src/backend/executor/execMain.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/backend/executor') diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 0352d9a5e43..41b6737049b 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -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. -- cgit v1.2.3