469,086 Members | 1,227 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,086 developers. It's quick & easy.

Serverless/embedded PostgreSQL database

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
6 11436
534 Expert 512MB
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
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
534 Expert 512MB
... 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
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
534 Expert 512MB
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:

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
Thanks for you input.
May 24 '07 #7

Post your reply

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

By using this site, you agree to our Privacy Policy and Terms of Use.