cvisual-studiopostgresqlpostgresql-extensions

PostgreSQL 9.6.1 extensions with Visual Studio 2015


I am trying to add POWA to my PostgreSQL installation. In order to do that I have to add an extension called pg_stat_statements. Since I am on windows platform I have to create a DLL of this extension and add it to the lib folder of PostgreSQL. I Followed the tutorial in this link. It is for PostgreSQL 9.3 using Visual Studio 2010. But I am using PostgreSQL 9.6.1 and Visual Studio 2015.

I am sure that I didn't miss any step in that tutorial. I have set the compilation mode to C and included the source file paths. But I am getting many compilation errors when I try to build my project.

See this image for included paths and compilation errors

Why am I getting errors even after including all the necessary source files? When I include the pg_stat_statements.c file I get even more errors?

I am not familiar with C/C++ coding. Please help me to solve this issue.


Solution

  • pg_stat_statements is bundled in PostgreSQL. You don't need to compile it yourself.


    Update: user compiled PostgreSQL its self from source. In this case, pg_stat_statements is part of contrib/ and is compiled with the rest of the contrib tools.