Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sr_plan broken on PG 12 #2

Open
gsstark opened this issue Aug 16, 2019 · 1 comment
Open

sr_plan broken on PG 12 #2

gsstark opened this issue Aug 16, 2019 · 1 comment

Comments

@gsstark
Copy link

gsstark commented Aug 16, 2019

It looks like sr_plan needs to be adjusted for the new table access methods work from Andres.:


make USE_PGXS=1
gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -O2 -fPIC -I. -I./ -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2   -c -o sr_plan.o sr_plan.c -MMD -MP -MF .deps/sr_plan.Po
sr_plan.c: In function ‘lookup_plan_by_query_hash’:
sr_plan.c:397:2: warning: implicit declaration of function ‘index_getnext’ [-Wimplicit-function-declaration]
  while ((htup = index_getnext(query_index_scan, ForwardScanDirection)) != NULL)
  ^
sr_plan.c:397:15: warning: assignment makes pointer from integer without a cast [enabled by default]
  while ((htup = index_getnext(query_index_scan, ForwardScanDirection)) != NULL)
               ^
sr_plan.c: In function ‘sr_planner’:
sr_plan.c:551:3: error: too few arguments to function ‘index_fetch_heap’
   htup = index_fetch_heap(query_index_scan);
   ^
In file included from /usr/local/pgsql/include/server/access/amapi.h:15:0,
                 from /usr/local/pgsql/include/server/access/hash.h:20,
                 from sr_plan.c:9:
/usr/local/pgsql/include/server/access/genam.h:164:13: note: declared here
 extern bool index_fetch_heap(IndexScanDesc scan, struct TupleTableSlot *slot);
             ^
sr_plan.c: In function ‘sr_query_expr_walker’:
sr_plan.c:716:29: error: ‘List’ has no member named ‘head’
    param->node = fexpr->args->head->data.ptr_value;
                             ^
sr_plan.c:738:17: error: ‘List’ has no member named ‘head’
      fexpr->args->head->data.ptr_value = param->node;
                 ^
sr_plan.c: In function ‘make_tupledesc’:
sr_plan.c:910:2: error: too many arguments to function ‘CreateTemplateTupleDesc’
  tupdesc = CreateTemplateTupleDesc(1, false);
  ^
In file included from /usr/local/pgsql/include/server/executor/tuptable.h:19:0,
                 from /usr/local/pgsql/include/server/nodes/print.h:17,
                 from sr_plan.h:8,
                 from sr_plan.c:1:
/usr/local/pgsql/include/server/access/tupdesc.h:94:18: note: declared here
 extern TupleDesc CreateTemplateTupleDesc(int natts);
                  ^
@stalkerg
Copy link
Contributor

stalkerg commented Sep 4, 2019

I think you right, in PG12 they change internal API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants