I have done this before with out too much trouble using ArcGIS 10. I1 and 10.2 unfortunately it does not work with 9.3 and postgres 9.2 I think from memory.
I used the drivers from esri. Logon to the ESRI customer care site although I think this has changed since I wrote the instructions.
TipQueryLayer4.png
The only thing to watch for is that the data being returned has to have a unique field that can be used as a primary key by ArcGIS. Sometimes you may need to specify it if you are using more than just a basic query and ArcGIS cannot work out which field to use. You can do this by:
You can also run the spatial queries against the postgres data base with relative ease although you have to create amanufacture an id field on the fly.
I did a full tutorial e.g. Here is an example of doing a while back at: http://www.gisuser.org.nz/resources/tips-and-tricks/look-mum-dad-no-hands100km buffer.
SELECT row_number() over(order by cities.the_geom)::integer as oid,
ST_BUFFER(cities.the_geom, 100000) AS the_geom,
cities.name
FROM mygis.public.cities As cities
Not only that you can also save any query layer as a layer file and pass it through some of the standard ArcGIS tools as well. I have not tested this too much. So adding columns and stuff like that I could see that causing havoc. I think you could make spatial SQL call like thatcalls with other databases like SQLServer and Oracle as well with a bit of fiddling to create the on the fly id numberfield.
I did a full tutorial a while back at: http://www.gisuser.org.nz/resources/tips-and-tricks/look-mum-dad-no-hands