PostgreSQL question

Everything else that doesn't fall into one of the other PB categories.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

PostgreSQL question

Post 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.
I may look like a mule, but I'm not a complete ass.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: PostgreSQL question

Post by srod »

Never mind....

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

:)

Doh!!!!!!!
I may look like a mule, but I'm not a complete ass.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: PostgreSQL question

Post 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!
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: PostgreSQL question

Post 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! :)
I may look like a mule, but I'm not a complete ass.
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Re: PostgreSQL question

Post 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.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: PostgreSQL question

Post 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.
I may look like a mule, but I'm not a complete ass.
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: PostgreSQL question

Post 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
Post Reply