pgpool2.git / summary / log / commit / refs

commit    5c19f2e6e1c47ccf352c095727d46f191a26c285
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Tue Apr 16 08:31:58 2013 +0000

    Fix outfuncs.c to adopt CREATE ... LIKE. Now test/parser/create passes
    so far.


parser/outfuncs.c | 10 +++------- test/parser/expected/create.out | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/parser/outfuncs.c b/parser/outfuncs.c index 293ae37b8..1a8973d58 100644 --- a/parser/outfuncs.c +++ b/parser/outfuncs.c @@ -183,7 +183,7 @@ static void _outFuncOptList(String *str, List *list); static void _outCreatedbOptList(String *str, List *options); static void _outOperatorArgTypes(String *str, List *args); static void _outRangeFunction(String *str, RangeFunction *node); -//static void _outInhRelation(String *str, InhRelation *node); +static void _outInhRelation(String *str, TableLikeClause *node); static void _outWithDefinition(String *str, List *def_list); static void _outCurrentOfExpr(String *str, CurrentOfExpr *node); @@ -5084,9 +5084,8 @@ _outXmlSerialize(String *str, XmlSerialize *node) } -#ifdef NOT_USED static void -_outInhRelation(String *str, InhRelation *node) +_outInhRelation(String *str, TableLikeClause *node) { string_append_char(str, "LIKE "); _outNode(str, node->relation); @@ -5110,7 +5109,6 @@ _outInhRelation(String *str, InhRelation *node) } } } -#endif static void _outWithDefinition(String *str, List *def_list) @@ -5748,11 +5746,9 @@ _outNode(String *str, void *obj) _outAlterTSConfigurationStmt(str, obj); break; -#ifdef NOT_USED - case T_InhRelation: + case T_TableLikeClause: _outInhRelation(str, obj); break; -#endif default: break; diff --git a/test/parser/expected/create.out b/test/parser/expected/create.out index 87fe61dd0..70851d17b 100644 --- a/test/parser/expected/create.out +++ b/test/parser/expected/create.out @@ -15,7 +15,7 @@ syntax error: CREATE TABLE foo (a, b) ON COMMIT PRESERVE ROWS TABLESPACE data CREATE TABLE "foo" ("a", "b") ON COMMIT DROP AS SELECT 1,2 CREATE TABLE "foo" ("a", "b") ON COMMIT DELETE ROWS AS SELECT 1,2 CREATE TABLE "foo" ("a", "b") ON COMMIT PRESERVE ROWS AS SELECT 1,2 -CREATE TABLE "foo" ("a", "b") ON COMMIT PRESERVE ROWS AS SELECT 1,2 +CREATE TABLE "foo" ("a", "b") ON COMMIT PRESERVE ROWS TABLESPACE "data" AS SELECT 1,2 CREATE TABLE "foo" ("a" int4,LIKE "a" INCLUDING DEFAULTS) CREATE TABLE "foo" ("a" int4,LIKE "a" INCLUDING CONSTRAINTS) CREATE TABLE "foo" ("a" int4,LIKE "a" INCLUDING CONSTRAINTS INCLUDING INDEXES) [parent: fed85d203309]