aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execMain.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2009-02-02 19:31:40 +0000
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2009-02-02 19:31:40 +0000
commit3a5b77371522b64feda006a7aed2a0e57bfb2b22 (patch)
tree2a3660571ea184c8e40a78608839914af4f2bb27 /src/backend/executor/execMain.c
parent80f95a6500d7f5762e4701c80eb202c3fce9095f (diff)
downloadpostgresql-3a5b77371522b64feda006a7aed2a0e57bfb2b22.tar.gz
postgresql-3a5b77371522b64feda006a7aed2a0e57bfb2b22.zip
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.
Diffstat (limited to 'src/backend/executor/execMain.c')
-rw-r--r--src/backend/executor/execMain.c16
1 files changed, 14 insertions, 2 deletions
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.