Re: reloptions with a "namespace"

From: Khee Chin <kheechin(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: reloptions with a "namespace"
Date: 2009-04-03 19:14:42
Message-ID: 797115b80904031214oa669b4fnc8e3dc66ad01c8cb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I've noticed a difference in 8.3.7 vs 8.4 (via git branch -r)
behaviour

8.3
----
testdb=> create table foo (bar bigserial primary key with
(fillfactor=75));
NOTICE: CREATE TABLE will create implicit sequence "foo_bar_seq" for
serial column "foo.bar"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
"foo_pkey" for table "foo"
CREATE TABLE
testdb=> \d foo;
Table "public.foo"
Column | Type | Modifiers
--------+--------+---------------------------------------------------
bar | bigint | not null default nextval('foo_bar_seq'::regclass)
Indexes:
"foo_pkey" PRIMARY KEY, btree (bar) WITH (fillfactor=75)

testdb=>

8.4
----
testdb=> create table foo (bar bigserial primary key with
(fillfactor=75));
NOTICE: CREATE TABLE will create implicit sequence "foo_bar_seq" for
serial column "foo.bar"
ERROR: unrecognized parameter namespace "fillfactor"
testdb=>

Additionally, "ALTER TABLE ONLY foo ADD CONSTRAINT bar PRIMARY KEY
(baz) WITH (fillfactor=n);" doesn't work on 8.4, which is used by
pg_dumpall on tables created with a fill-factor in 8.3.

After some debugging in reloptions.c, I've realised that the issue is
caused by fillfactor not having a validnsps in transformRelOptions.
Adding an additional condition "&& (validnsps))" at line 595 or 612
appears to fix the issue.

Regards,
Khee Chin.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-04-03 19:33:15 Re: reloptions with a "namespace"
Previous Message Alvaro Herrera 2009-04-03 19:01:29 Re: can't load plpython