Cocoa PSQL : Mac OSX utility for the Postgres DBMS

 

Updated May 3, 2002

Download: Unix Tar Archive of Project Builder Source Files (updated 5/3/2002)



"Cocoa PSQL" is intended to bring psql command line functionality to the Mac OS X GUI.

"Cocoa PSQL" is licensed under the GNU PUBLIC LICENSE.


To compile "Cocoa PSQL" you will need a properly compiled static "pq" library for your machine (libpq.a) and the associated postgres header files.

I found the simplest way to compile and install postgress on OS X was using "fink" (http://fink.sourceforge.net/), a tool to install ported *nix software to mac OS X.

This project is setup to assume standard paths (as set by fink) for the additional headers in "/sw/include" and the library to reside in "/sw/lib/libpq.a".

When I first linked against the libpq.a the linker barfed and I needed to run "ranlib /sw/lib/libpq.a" on the file. I am not quite sure why this happened but I have not investigated the linker flags enough to know.

This utility is still in its infancy. Right now it supports making connections to the postmaster backend, issuing queries (select, update, insert, delete), and displaying results (if there are any) in a dynamic tableview.

There are many things left to do.

Some include (no particular order):

  1. Activate the maximum results option.
  2. Fix the disconnect system to allow for proper menu operation. (this should now be working)
  3. Change the connection and querying model to non-blocking operation. This will also fix a bug where only the last of multiple
  4. Queries in the text window will be sent to the back end from processing.
  5. Make the NSTableColumn objects dynamically resize based contents
  6. Add automatic system table interegation when issuing \ commands.
  7. Clean up the interface, it is still kind of a mess.(work in progress)
  8. Add scrollback capabilities in the query window.
  9. Add saved query (or queries from the review window) to be executed when drag and dropped on the results area.
  10. Add persistenace to the connection settings and introduce "reasonable" default values.. (done: thanks Olaf)
  11. Add more information about the connection parameters and status to the interface.
  12. Create and add an identifying icon to the program.
  13. Put this project in to CVS if people are interested in further development. (I am a newby to CVS, we have a sourceforge account but I have not used it before)

If you find this program even remotely useful please drop me a note and let me know: al@kirkus.org.


If you wish to help develop this program further that is also appreciated. I am a novice to Cocoa programming so more experienced help is always appreciated.This program was built using Apple's Developer Tools and Project Builder 1.1 (v73.3) (see http://www.apple.com/developer).