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

Serverless/embedded PostgreSQL database

P: 8
Hi All,

I am trying to connct to a serverless/embedded PostgreSQL database from a C# application using VS 2005. First of all, is this possible with PostgreSQL? I know this can be done with some other database providers (sqllite?). If anyone has connected to such a database using some other method/language I'd be greatful for the information.

Thank you in advance for any information.
May 16 '07 #1
Share this Question
Share on Google+
6 Replies


Expert 100+
P: 534
Postgresql cannot be used in this manner. If you must use an embedded database look at the Berkeley Db, or CodeBase from Sequiter, or better yet do a Google search for "embedded database" or "open source embedded database"
May 17 '07 #2

P: 8
Thank you for your reply. Unfortunately we have a product which comes with embedded PostgreSQL and I need to find a way to connect to the database, if possible. Or find another way to extract the information from the database. I have been googling for the past few days for some clue. But my search hasn't yielded anything fruitful yet.
May 18 '07 #3

Expert 100+
P: 534
... we have a product which comes with embedded PostgreSQL
As it often happens this term - "embedded" - may have more than one meaning depending on the context.

Can you use Postgresql the way it's supposed to be used, with postmaster running and serving the clients?
May 18 '07 #4

P: 8
Can you use Postgresql the way it's supposed to be used, with postmaster running and serving the clients?
I am honestly not sure if it can be done or not. But I tried to connect to PostgreSQL using some existing methods (ODBC, npgsql) from c# application assuming it to be a regular database server. However, I received errors with both mothods of connecting. With npgsql the error was something along the line of "server actively refused connection". And with ODBC it was more like "server doesn't support the version of method call". This makes me wonder whether a postmaster is running to serve client or not.
May 22 '07 #5

Expert 100+
P: 534
Obviously you cannot connect to the database if server is not running. On Windows it can be setup as a service, of you prefer you can start it by hand.
On Unix the startup script can be called from the system boot scripts, or it can be started by hand.
Review these manuals, it may help you to get a better understanding of things involved:
http://www.postgresql.org/docs/8.2/static/runtime.html
http://www.postgresql.org/docs/8.2/s...ver-start.html
http://www.postgresql.org/docs/8.2/s...pp-pg-ctl.html

Once server is running you can verify it with psql,
something simple like psql -l will do.

When you confirm that server responds, then you can go on working through your client API.
May 22 '07 #6

P: 8
Thanks for you input.
May 24 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.