title: How to build a Postgres IDE in Emacs
body: <p>I noticed emacs has a <code>sql-postgres</code> mode.  It's a good start, but my needs are very different.  I usually have a large SQL file that I am editing and I want to "run" it on the database.  I would like to edit my code in Emacs, not PG Admin.  However, I am a bit more picky on how I see the results.  I would rather not see a new Emacs buffer since Emacs doesn't really do grids that well. I was thinking of popping up some program that could show me the results in a very pretty, interactive view.  Maybe something like openoffice or some custom piece of code.</p>
  
  <p>I think the best method is to hack together a makefile that will automatically run the sql file against postgres (which may even allow me to jump to any errors).  Then, if the script is successful, possible pipe the results to some program.  But which program and how can I get those results to it?</p>
  
  <p>Please let me know if there is a better way.  I don't want some commercial software or Windows-only freeware.  I'd prefer OpenSource.  Any advice?</p>