aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/spi/README.md
blob: ec6a9016aa032dc267eb2d8be26335f7ffed184a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
                           Server Programming Interface (SPI)


Dependencies:
=============

These are the direct dependencies for running SPI functions :



Step 1:
"postgresql-server-dev-<depends on your postgresql version>"
-- sudo apt-get install libpq-dev postgresql-server-dev-13

Step 2:
To solve gssapi/gssapi.h, use the following command:
apt-get install libkrb5-dev

Step 3:
apt-cache search openssl | grep -- -dev
apt-get install libssl-dev

Compile:
========
gcc -shared -o <file_name>.so <file_name>.c

CALL FUNCTIONS:
===============

psql -c "SELECT <function_name>();" db_name

Structure:
==========

usr/include/postgres/

usr/include/postgres/13/server/

make
make install
psql