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

pg_store_plans.c:268:6: error: unknown type name 'QueryEnvironment' #9

Open
NgJingRui opened this issue Nov 25, 2020 · 1 comment
Open

Comments

@NgJingRui
Copy link

I am facing this issue when I ran make in the pg_store_plans directory. This issue is faced when I ran it on windows and on Macbook. Does anyone has any suggestions on how this error can be resolved?

x86_64-w64-mingw32-gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2   -I. -I. -I../../src/include -I./src/include/port/win32 -DEXEC_BACKEND  "-I../../src/include/port/win32" -DWIN32_STACK_RLIMIT=4194304  -c -o pg_store_plans.o pg_store_plans.c
pg_store_plans.c:268:6: error: unknown type name 'QueryEnvironment'
  268 |      QueryEnvironment *queryEnv,
      |      ^~~~~~~~~~~~~~~~
pg_store_plans.c: In function '_PG_init':
pg_store_plans.c:434:19: warning: assignment to 'ExecutorRun_hook_type' {aka 'void (*)(QueryDesc *, ScanDirection,  long long unsigned int)'} from incompatible pointer type 'void (*)(QueryDesc *, ScanDirection,  uint64,  bool)' {aka 'void (*)(QueryDesc *, ScanDirection,  long long unsigned int,  char)'} [-Wincompatible-pointer-types]
  434 |  ExecutorRun_hook = pgsp_ExecutorRun;
      |                   ^
pg_store_plans.c:440:24: error: 'pgsp_ProcessUtility' undeclared (first use in this function); did you mean 'prev_ProcessUtility'?
  440 |  ProcessUtility_hook = pgsp_ProcessUtility;
      |                        ^~~~~~~~~~~~~~~~~~~
      |                        prev_ProcessUtility
pg_store_plans.c:440:24: note: each undeclared identifier is reported only once for each function it appears in
pg_store_plans.c: In function 'pgsp_ExecutorRun':
pg_store_plans.c:730:4: error: too many arguments to function 'prev_ExecutorRun'
  730 |    prev_ExecutorRun(queryDesc, direction, count, execute_once);
      |    ^~~~~~~~~~~~~~~~
pg_store_plans.c:732:4: error: too many arguments to function 'standard_ExecutorRun'
  732 |    standard_ExecutorRun(queryDesc, direction, count, execute_once);
      |    ^~~~~~~~~~~~~~~~~~~~
In file included from ../../src/include/commands/explain.h:16,
                 from pg_store_plans.c:40:
../../src/include/executor/executor.h:179:13: note: declared here
  179 | extern void standard_ExecutorRun(QueryDesc *queryDesc,
      |             ^~~~~~~~~~~~~~~~~~~~
pg_store_plans.c: At top level:
pg_store_plans.c:830:6: error: unknown type name 'QueryEnvironment'
  830 |      QueryEnvironment *queryEnv,
      |      ^~~~~~~~~~~~~~~~
pg_store_plans.c: In function 'pg_store_plans':
pg_store_plans.c:1043:57: error: 'DEFAULT_ROLE_READ_ALL_STATS' undeclared (first use in this function)
 1043 |  bool  is_allowed_role = is_member_of_role(GetUserId(), DEFAULT_ROLE_READ_ALL_STATS);
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [<builtin>: pg_store_plans.o] Error 1
@idevloo
Copy link

idevloo commented Sep 3, 2021

Were you able to solve this, I'm facing the same issue.

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