Thread: Embed PostgreSQL in application

Embed PostgreSQL in application

From
Lukas Demetz
Date:
Hi there,

for a program I am building, which uses PostgreSQL as its backend, I want to embed the DB engine into the application's setup. Now I wonder if something like Firebird's "Embedded server" (a DLL ) is also available for PostgreSQL, or if there are other ways to minimize or remove completely the need for a user to install PostgreSQL on his own.

Thanks for the responses

-- 
Lukas Demetz
Digiem Snc
http://www.digiem.net

Re: Embed PostgreSQL in application

From
Tony Caduto
Date:
There is no reason why you couldn't just use Inno setup to include the
setup of your app and Postgresql in a single setup.
I do something similar with Firebird for a IM server with Inno setup, I
do not use the embedded "dll" version of Firebird either.

I plan to create a Inno setup for the win32 version of Postgres at some
point, IMO the windows installer that is currently used is overly
cryptic unless you use something like Wise Windows installer.

Inno is a great choice, wish Postgresql used it instead of the windows
installer.

http://www.jrsoftware.org

Lukas Demetz wrote:

> Hi there,
>
> for a program I am building, which uses PostgreSQL as its backend, I
> want to embed the DB engine into the application's setup. Now I wonder
> if something like Firebird's "Embedded server" (a DLL ) is also
> available for PostgreSQL, or if there are other ways to minimize or
> remove completely the need for a user to install PostgreSQL on his own.
>
> Thanks for the responses
>
>--
>Lukas Demetz
>Digiem Snc
>http://www.digiem.net
>

--
Tony Caduto
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql 8.x


Re: Embed PostgreSQL in application

From
Chris Browne
Date:
lukas@digiem.net (Lukas Demetz) writes:
> Hi there, for a program I am building, which uses PostgreSQL as its
> backend, I want to embed the DB engine into the application's
> setup. Now I wonder if something like Firebird's "Embedded server"
> (a DLL ) is also available for PostgreSQL, or if there are other
> ways to minimize or remove completely the need for a user to install
> PostgreSQL on his own. Thanks for the responses -- Lukas Demetz

There isn't any direct such option.

But nothing stops you from forking a process without telling the user
about it.

You tell the user "I need this port and this directory", and don't
bother telling the user when you start up the database there.

After all, spawning processes cheaply is one of Unix's strengths; you
might as well use that strength...
--
let name="cbbrowne" and tld="cbbrowne.com" in name ^ "@" ^ tld;;
http://cbbrowne.com/info/languages.html
"[In 'Doctor' mode],  I spent a good ten minutes  telling Emacs what I
thought of it.   (The response was, 'Perhaps you could  try to be less
abusive.')"  -- Matt Welsh