I don't know PostgreSQL. Nevertheless, here are some informations:
- there is a short summary about the
techniques on how to dynamically load a shared library from an *.elf application, on the *nixes, and on Linux in particular.
- there's a freeware named
Debreate in order to create a binary installation package (*.deb), under Linux (in which one can code a bash script for example -
#! /bin/bash -e - in its proposed post-install event, among other events; we can code inside an "un-gzip", an "un-tar" a tree-archive, create a soft-symlink, launch an "apt-get install *.deb" of an already existing and shipped\included binary package dropped inside the\your said current installation, ...).
- from one embedded to another, maybe: you could look at the installation discussions concerning the Firebird embedded applications. It's possible that the same recipes work with the embedded PostgreSQL version, too (that said, I don't know if you're using such an embedded PostgreSQL's version).