/
HOWTO
40 lines (30 loc) · 875 Bytes
/
HOWTO
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
You will need to have a GNU make, and a Postgres database instance running (8.2x, 8.3x, 8.4x, 8.5x) with the plpgsql PL language installed:
If you will be creating a new database:
cd ~/postgresql
createdb test
createlang plpgsql test # currently required by pgTAP
Now to build PL/Parrot:
cd ~/git/plparrot
make
Install it in $libdir
cd src/handler
make install
Install it in the test database. (Works in PostgreSQL 8.3 or better, as should you ;)
psql test
INSERT INTO pg_catalog.pg_pltemplate(
tmplname,
tmpltrusted,
tmpldbacreate,
tmplhandler,
tmpllibrary
)
VALUES (
'plparrot',
true,
true,
'plparrot_call_handler',
'$libdir/plparrot'
);
CREATE LANGUAGE plparrot;
To test PL/Parrot (uses pgTAP)
psql -f t/test.sql test