how to use the struct "RangeFunction" in Postgres 9.6 ?

From: lin <jluwln(at)163(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: how to use the struct "RangeFunction" in Postgres 9.6 ?
Date: 2017-05-22 11:25:46
Message-ID: 4e310141.fbf3.15c2fe7e767.Coremail.jluwln@163.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,
I am puzzled for how to use the struct "RangeFunction" in Postgres 9.6, the struct "RangeFunction" is not the same with 9.3.
Can someone help me how to write the function "make_RangeFunction"?

the code as below:
SelectStmt *stmt = makeNode(SelectStmt);
List *args = list_make1(makeStringConst($2, @2));
args = lappend(args, makeStringConst($3, @3));
stmt->targetList = list_make1(make_star_target(-1));
stmt->fromClause = list_make1(make_RangeFunction("function_name", args));
static Node* make_RangeFunction(const char *func_name, List *func_args)
{
RangeFunction *n = makeNode(RangeFunction);
.... (how to write this function)
}

Thanks,
wln

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2017-05-22 12:56:55 Re: issue performing a switchover with repmgr
Previous Message Dylan Luong 2017-05-22 08:15:44 issue performing a switchover with repmgr