postgresql: enable XML functions
I suspect these functions aren't widely used, but they are enabled in PostgreSQL on Ubuntu and Arch.
This commit is contained in:
parent
39ef4d2fe9
commit
502a272ee7
@ -13,6 +13,8 @@ let
|
|||||||
INSERT INTO sth (id) VALUES (1);
|
INSERT INTO sth (id) VALUES (1);
|
||||||
INSERT INTO sth (id) VALUES (1);
|
INSERT INTO sth (id) VALUES (1);
|
||||||
INSERT INTO sth (id) VALUES (1);
|
INSERT INTO sth (id) VALUES (1);
|
||||||
|
CREATE TABLE xmltest ( doc xml );
|
||||||
|
INSERT INTO xmltest (doc) VALUES ('<test>ok</test>'); -- check if libxml2 enabled
|
||||||
'';
|
'';
|
||||||
make-postgresql-test = postgresql-name: postgresql-package: makeTest {
|
make-postgresql-test = postgresql-name: postgresql-package: makeTest {
|
||||||
name = postgresql-name;
|
name = postgresql-name;
|
||||||
@ -41,6 +43,7 @@ let
|
|||||||
$machine->fail('test $(psql postgres -tAc "SELECT * FROM sth;"|wc -l) -eq 3');
|
$machine->fail('test $(psql postgres -tAc "SELECT * FROM sth;"|wc -l) -eq 3');
|
||||||
$machine->succeed('test $(psql postgres -tAc "SELECT * FROM sth;"|wc -l) -eq 5');
|
$machine->succeed('test $(psql postgres -tAc "SELECT * FROM sth;"|wc -l) -eq 5');
|
||||||
$machine->fail('test $(psql postgres -tAc "SELECT * FROM sth;"|wc -l) -eq 4');
|
$machine->fail('test $(psql postgres -tAc "SELECT * FROM sth;"|wc -l) -eq 4');
|
||||||
|
$machine->succeed('test $(psql postgres -tAc "SELECT xpath(\'/test/text()\', doc) FROM xmltest;"|wc -l) -eq 1');
|
||||||
$machine->shutdown;
|
$machine->shutdown;
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, glibc, fetchurl, zlib, readline, libossp_uuid, openssl, makeWrapper }:
|
{ lib, stdenv, glibc, fetchurl, zlib, readline, libossp_uuid, openssl, libxml2, makeWrapper }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ let
|
|||||||
setOutputFlags = false; # $out retains configureFlags :-/
|
setOutputFlags = false; # $out retains configureFlags :-/
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ zlib readline openssl makeWrapper ]
|
[ zlib readline openssl libxml2 makeWrapper ]
|
||||||
++ lib.optionals (!stdenv.isDarwin) [ libossp_uuid ];
|
++ lib.optionals (!stdenv.isDarwin) [ libossp_uuid ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
@ -24,6 +24,7 @@ let
|
|||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-openssl"
|
"--with-openssl"
|
||||||
|
"--with-libxml"
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
"--libdir=$(lib)/lib"
|
"--libdir=$(lib)/lib"
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user