Alvaro Herrera escribió: > Khee Chin escribió: > > > 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. > > No, the bug is that they are passed as DefElem instead of RelOptElem. > The right fix is in the grammar ... checking now.
This patch seems to be the right cure. (Some other users of opt_definition remain; I think it's just CREATE FUNCTION by now). -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
Index: src/backend/parser/gram.y =================================================================== RCS file: /home/alvherre/Code/cvs/pgsql/src/backend/parser/gram.y,v retrieving revision 2.660 diff -c -p -r2.660 gram.y *** src/backend/parser/gram.y 7 Mar 2009 00:13:57 -0000 2.660 --- src/backend/parser/gram.y 3 Apr 2009 19:35:38 -0000 *************** ColConstraintElem: *** 2188,2194 **** n->indexspace = NULL; $$ = (Node *)n; } ! | UNIQUE opt_definition OptConsTableSpace { Constraint *n = makeNode(Constraint); n->contype = CONSTR_UNIQUE; --- 2188,2194 ---- n->indexspace = NULL; $$ = (Node *)n; } ! | UNIQUE opt_reloptions OptConsTableSpace { Constraint *n = makeNode(Constraint); n->contype = CONSTR_UNIQUE; *************** ColConstraintElem: *** 2200,2206 **** n->indexspace = $3; $$ = (Node *)n; } ! | PRIMARY KEY opt_definition OptConsTableSpace { Constraint *n = makeNode(Constraint); n->contype = CONSTR_PRIMARY; --- 2200,2206 ---- n->indexspace = $3; $$ = (Node *)n; } ! | PRIMARY KEY opt_reloptions OptConsTableSpace { Constraint *n = makeNode(Constraint); n->contype = CONSTR_PRIMARY; *************** ConstraintElem: *** 2363,2369 **** n->indexspace = NULL; $$ = (Node *)n; } ! | UNIQUE '(' columnList ')' opt_definition OptConsTableSpace { Constraint *n = makeNode(Constraint); n->contype = CONSTR_UNIQUE; --- 2363,2369 ---- n->indexspace = NULL; $$ = (Node *)n; } ! | UNIQUE '(' columnList ')' opt_reloptions OptConsTableSpace { Constraint *n = makeNode(Constraint); n->contype = CONSTR_UNIQUE; *************** ConstraintElem: *** 2375,2381 **** n->indexspace = $6; $$ = (Node *)n; } ! | PRIMARY KEY '(' columnList ')' opt_definition OptConsTableSpace { Constraint *n = makeNode(Constraint); n->contype = CONSTR_PRIMARY; --- 2375,2381 ---- n->indexspace = $6; $$ = (Node *)n; } ! | PRIMARY KEY '(' columnList ')' opt_reloptions OptConsTableSpace { Constraint *n = makeNode(Constraint); n->contype = CONSTR_PRIMARY;
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers