1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-17 17:02:08 +03:00

Add a convenience routine makeFuncCall to reduce duplication.

David Fetter and Andrew Gierth, reviewed by Jeevan Chalke
This commit is contained in:
Robert Haas
2013-07-01 14:41:33 -04:00
parent 3132a9b7ab
commit 0d22987ae9
5 changed files with 96 additions and 351 deletions

View File

@ -448,16 +448,9 @@ transformColumnDefinition(CreateStmtContext *cxt, ColumnDef *column)
castnode->typeName = SystemTypeName("regclass");
castnode->arg = (Node *) snamenode;
castnode->location = -1;
funccallnode = makeNode(FuncCall);
funccallnode->funcname = SystemFuncName("nextval");
funccallnode->args = list_make1(castnode);
funccallnode->agg_order = NIL;
funccallnode->agg_star = false;
funccallnode->agg_distinct = false;
funccallnode->func_variadic = false;
funccallnode->over = NULL;
funccallnode->location = -1;
funccallnode = makeFuncCall(SystemFuncName("nextval"),
list_make1(castnode),
-1);
constraint = makeNode(Constraint);
constraint->contype = CONSTR_DEFAULT;
constraint->location = -1;