By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,852 Members | 2,220 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,852 IT Pros & Developers. It's quick & easy.

Embedding Postgres "inside" an application

P: n/a
Does anyone know if there's a way to embed the Postgres database inside
an application... so that it runs transparently, without the user even
having to know it's there? I would prefer to use Postgres, but I fear
that I may have to resort to mySQL or some other SQL database that can
be embedded.

I'm building a Cocoa app on OS X and am familiar with the libpq C
library. Thanks!

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 11 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Joe Lester <jo********@sweetwater.com> writes:
Does anyone know if there's a way to embed the Postgres database
inside an application... so that it runs transparently, without the
user even having to know it's there? I would prefer to use Postgres,
but I fear that I may have to resort to mySQL or some other SQL
database that can be embedded.


You can't prevent the server from running as a separate process
(without hugely major surgery) but you can certainly embed the server
in your app bundle and run it "behind the scenes". Picking a place
for the data files, etc might be a little tricky, but it should all be
doable.

AFAIK, MySQL also has to run as a server--I don't think you can link
to it as a library and access its databases from a single process.

-Doug

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 11 '05 #2

P: n/a
In article <m3************@varsoon.wireboard.com>,
Doug McNaught <do**@mcnaught.org> writes:
Joe Lester <jo********@sweetwater.com> writes:
Does anyone know if there's a way to embed the Postgres database
inside an application... so that it runs transparently, without the
user even having to know it's there? I would prefer to use Postgres,
but I fear that I may have to resort to mySQL or some other SQL
database that can be embedded.
You can't prevent the server from running as a separate process
(without hugely major surgery) but you can certainly embed the server
in your app bundle and run it "behind the scenes". Picking a place
for the data files, etc might be a little tricky, but it should all be
doable. AFAIK, MySQL also has to run as a server--I don't think you can link
to it as a library and access its databases from a single process.


Wrong. MySQL comes in two flavors, as a standalone server and as an
embedded library.
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 11 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.