Showing posts with label Makefile. Show all posts
Showing posts with label Makefile. Show all posts

Adding libpq in Contrib module

To include libpq functions in the contrib module the following header should be included:
#include "libpq-fe.h"
However, it throws the following error:
error: libpq-fe.h: No such file or directory
This can be solved by including the following in Makefile of that contib
PG_CPPFLAGS = -I$(libpq_srcdir)
This includes the option -I../../src/interfaces/libpq during make and hence the header file becomes accessible.