I need to connect to the Postgres database from a C. I was able to connect to the database. Then I tried to execute the following command
create function sendevent() returns trigger as '/usr/lib/pgsql/libevent.so' language 'C';
When I do that I am getting the error message " permission denied for language c"
What am I doing wrong? Also, would it be possible to connect from a C++ program?
This is how I am building my program.
gcc -I/usr/include -I/usr/include/libxml2 -I/usr/include/pgsql/server -g -c ConnectDB.c
gcc -I/usr/include -I/usr/include/libxml2 -I/usr/include/pgsql/server -g -o conn -L/usr/lib -lpq ConnectDB.o