Page 1 of 1

PostgreSQL question

Posted: Tue Aug 03, 2010 5:09 pm
by srod
Hi,

I have PostgreSQL server running and it all works fine when accessed from the localhost.

Now when I switch to a remote client I can not connect in any way shape or form to the PostgreSQL server. I have made all the documented modifications to the 'postgresql.conf' and 'pg_hba.conf' files but no joy.

Port forwarding is working fine as I tested with some PB code and a PB created server. Without forwarding I could not connect to the PB server. With forwarding everything was fine.

There must be some config setting I am missing.

Has anyone any experience with this who could perhaps lend a hand or two? I really do want to get this thing working because I really like PostgreSQL... what I have seen of it so far anyhow. :)

Thanks.

Re: PostgreSQL question

Posted: Tue Aug 03, 2010 5:13 pm
by srod
Never mind....

srod wanders off with a silent promise to kick the Windows firewall in the nether-regions!!!

:)

Doh!!!!!!!

Re: PostgreSQL question

Posted: Tue Aug 03, 2010 9:05 pm
by blueznl
I had the same problems when working on the Survival Guide... :-)
4. Check your (Windows) firewall configuration. Open port 5432. You may have to enable file and printer sharing on your SQL server.
Duh! Me stupid too!

Re: PostgreSQL question

Posted: Tue Aug 03, 2010 9:21 pm
by srod
Yea, I'm actually running PostgreSQL in a VM and was trying to hook up to it from the host. Well, it all works dandy now which is the important thing! :)

Re: PostgreSQL question

Posted: Wed Aug 04, 2010 5:13 pm
by Xombie
I love PostgreSQL. It's what I set up to use as the main database at work and I've been using it nearly 3 years.

If you want any code or anything that uses a native connection rather than PB's PG connection, let me know.

Re: PostgreSQL question

Posted: Wed Aug 04, 2010 6:16 pm
by srod
Thanks Xombie. At the moment, a few niggles aside (which Fred will soon fix I'm sure!) PB's lib is looking fine. I supplement this with a couple of functions imported from PostgreSQL.lib where appropriate. The first hurdle was the multitude of code-pages which the server supports which can play merry buggery with SQL queries unless the server is instructed to make appropriate conversions automatically. Once I did this then it's full steam ahead! :)

I must admit that I do like this server. Very easy to use and set-up (Windows firewall aside!)

From now on I think I will look to support both SQLite and PostgreSQL natively in my applications where appropriate.

Re: PostgreSQL question

Posted: Fri Sep 02, 2011 4:34 am
by RichAlgeni
Xombie & SRod,

Have you found there are many instances where you need a native connection, rather than PureBasic's?

I was wondering specifically about transactions? Do you use them?

Thanks!

Rich