vibhorkum / pg_background

pg_background
GNU General Public License v3.0
136 stars 35 forks source link

Getting errors when trying to compile source on Ubuntu 14.04 (Postgres 9.5) #16

Closed deftones65 closed 5 years ago

deftones65 commented 5 years ago

make

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -pie -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/9.5/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o pg_background.o pg_background.c pg_background.c: In function ‘pg_background_result’: pg_background.c:333:57: error: request for member ‘atttypid’ in something not a structure or union getTypeBinaryInputInfo(funcctx->tuple_desc->attrs[i].atttypid, ^ pg_background.c:440:89: error: request for member ‘atttypid’ in something not a structure or union if (type_id != tupdesc->attrs[i].atttypid) ^ pg_background.c:446:74: error: request for member ‘atttypid’ in something not a structure or union else if(tupdesc->attrs[i].atttypid != TEXTOID) ^ pg_background.c:510:47: error: request for member ‘atttypid’ in something not a structure or union if (tupdesc->natts != 1 || tupdesc->attrs[0].atttypid != TEXTOID) ^ pg_background.c: In function ‘form_result_tuple’: pg_background.c:569:29: error: request for member ‘atttypmod’ in something not a structure or union tupdesc->attrs[i].atttypmod); ^ pg_background.c:579:29: error: request for member ‘atttypmod’ in something not a structure or union tupdesc->attrs[i].atttypmod); ^ pg_background.c: In function ‘pg_background_worker_main’: pg_background.c:808:82: error: too many arguments to function ‘BackgroundWorkerInitializeConnection’ NameStr(fdata->authenticated_user), 0); ^ In file included from /usr/include/postgresql/9.5/server/storage/shm_mq.h:16:0, from /usr/include/postgresql/9.5/server/libpq/pqmq.h:17, from pg_background.c:27: /usr/include/postgresql/9.5/server/postmaster/bgworker.h:135:13: note: declared here extern void BackgroundWorkerInitializeConnection(char dbname, char username); ^ make: *** [pg_background.o] Error 1

deftones65 commented 5 years ago

I've solved the issue by taking the previous version of pg_background (June 2018 one). It is the version mismatch because I am on Postgres 9.5