Administering a PostgreSQL from Windows
Created on 2nd November 2004 12:07 AM.
First of all, you're going to need a copy of pgAdmin. You can download the latest from pgadmin.org. Once you've downloaded, it's a simple install process. The only thing to be aware of is that you may want to add on some extra bells and whistles, and here I'm thinking particularly of the MS Access upgrade wizard. This is a handy utility that lets you import information in about four easy steps from an Access database into PostgreSQL. There are a few limitations (such as the lack of ability to correctly import foreign keys, or at least, Access's version of them), but these can be overcome and overall, it's a great tool.
So, once you've downloaded and installed pgAdmin, you're almost ready to go! All you need to do now is make sure your PostgreSQL database will allow you to access it from your Windows machine. There are a number of things to look out for here.
The first is to be sure you have TCP/IP connections enabled. The best place for this is in the postgresql.conf file in the data directory. Set tcpip_socket = true. Alternatively, you can start the postmaster with the -i flag to accept TCP/IP connections. You'll just need to make sure this is hardwired into the start up script for postgresql so that it outlasts this instance of the postmaster.
Secondly, you'll need to be sure you have permission to access the database. This is set in the pg_hba.conf file in the data directory. See the commented section of this file for details of how to configure access. Be sure to be as restrictive as possible, for security reasons.
That's it. All ready to go. Fire up pgAdmin, enter your database server details, and there you are.
