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.

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to