reloptions with a "namespace" - Mailing list pgsql-hackers

From Alvaro Herrera
Subject reloptions with a "namespace"
Date
Msg-id 20090113232642.GK4005@alvh.no-ip.org
Whole thread Raw
Responses Re: reloptions with a "namespace"
List pgsql-hackers
Attached is a patch that adds a namespace capability to reloptions.  It
works this way:

alter table foo set (namespace.option = value)

Currently the only namespace that does anything is "toast".  What it
does is store the option in the toast table pg_class.reloptions.

It works fine, i.e.  I can set a toast table fillfactor with a command
that references the main table.  I am also able to do this:
CREATE TABLE foo (a int, b text) WITH (fillfactor = 80, toast.fillfactor = 75);
and it correctly sets the fillfactor for both tables.

This uses a new parse node.  One possible disadvantage is that a command
like this works, but does nothing:

alvherre=# alter table foo set (test.foo = 1);
ALTER TABLE


This now needs pg_dump support to be complete.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Attachment

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: A single escape required for log_filename
Next
From: Andreas 'ads' Scherbaum
Date:
Subject: Re: Patch for str_numth() in PG 7.4