Re: [GENERAL] Installing module for 9.6, not 9.2, on Centos? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: [GENERAL] Installing module for 9.6, not 9.2, on Centos?
Date
Msg-id 05a07f70-354f-3179-134e-6c263edac87d@aklaver.com
Whole thread Raw
In response to [GENERAL] Installing module for 9.6, not 9.2, on Centos?  (Ken Tanzer <ken.tanzer@gmail.com>)
Responses Re: [GENERAL] Installing module for 9.6, not 9.2, on Centos?
List pgsql-general
On 05/22/2017 09:41 PM, Ken Tanzer wrote:
> Hi.  I recently installed 9.6 on my Centos 6.9 server, alongside a
> still-running 9.2.
>
> I need to install a module for 9.6 (table_log) that is installed on 9.2.

Where did you get the table_log extension
> I took the table_log Makefile and changed it to point to
> /usr/pgsql-9.6/bin/pg_config instead of 9.2.  It is still installing
> into the 9.2 directory though.
>
> What's the cleanest or most proper way to target 9.6 in this situation?
> Transcript below, and TIA.
>

Using table_log from here:

http://pgfoundry.org/frs/?group_id=1000074

I usually do something like(using existing Makefile):


PATH=/usr/local/pgsql92/bin/:$PATH make USE_PGXS=1 clean all
rm -f table_log.so table_log.o
rm -f table_log.sql
sed 's,MODULE_PATHNAME,$libdir/table_log,g' table_log.sql.in >table_log.sql
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
-Wformat-security -fno-strict-aliasing -fwrapv
-fexcess-precision=standard -fpic -I. -I.
-I/usr/local/pgsql92/include/server
-I/usr/local/pgsql92/include/internal -D_GNU_SOURCE
-I/usr/include/libxml2   -c -o table_log.o table_log.c
table_log.c: In function ‘table_log’:


PATH=/usr/local/pgsql96/bin/:$PATH make USE_PGXS=1 clean all
rm -f table_log.so table_log.o
rm -f table_log.sql
sed 's,MODULE_PATHNAME,$libdir/table_log,g' table_log.sql.in >table_log.sql
gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
-Wformat-security -fno-strict-aliasing -fwrapv
-fexcess-precision=standard -O2 -fpic -I. -I./
-I/usr/local/pgsql96/include/server
-I/usr/local/pgsql96/include/internal -D_GNU_SOURCE
-I/usr/include/libxml2   -c -o table_log.o table_log.c
table_log.c: In function ‘table_log’:
table_log.c:134:3: warning: implicit declaration of function
‘RelationGetNamespace’ [-Wimplicit-function-declaration]

Though in both cases the extension did not actually compile due to errors.

--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] logical replication in PG10 BETA
Next
From: Igor Neyman
Date:
Subject: Re: [GENERAL] logical replication in PG10 BETA