OpenJump is a free open source GIS Desktop tool kit written in Java for doing spatial analysis and geometry manipulation.
This is by far my favorite desktop tool for doing spatial queries. I do a lot of ad hoc spatial queries with PostGIS and the Run Datastore Query option is to die for.
Once I figured out I had to wrap my geometriy column in an ST_AsBinary(the_geom) to render without issues, the rest is history. If you do a lot of ad hoc PostGIS spatial queries, I highly recommend this tool.
Note: OpenJump sports a lot of other features besides ad hoc PostGIS spatial query support such as viewing MrSID, ECW, WMS layers, geometry editing, various additional plugins and extensible plugin architecture, but its ad-hoc spatial query abilities really stand out for me. It is easy to use and to the point.