in reply to Interfacing with PostgreSQL

PostgreSQL has an RPM on their web site that contains the Pg PM that is needed to talk to the backend. There is also test code that you can use as a base from which to start your script(s). I haven't done anything with DBI, so I don't know if you can use it, but I'm not terribly displeased with the interface provided by Pg.

Your milage may vary since I was a DB guy back in the early 90's and just about any scripting interface is better than what I had available to me back then ;-).