parsetree_list = pg_parse_query(query_string);
foreach(parsetree, parsetree_list) {
querytree_list = pg_analyze_and_rewrite(parsetree, ...);
plantree_list = pg_plan_queries(querytree_list, ...);
portal = CreatePortal(...);
PortalDefineQuery(portal, ..., plantree_list, ...);
receiver = CreateDestReceiver(dest);
PortalRun(portal, ..., receiver, ...);
...
}
|