Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to create a connection from arcmap to pgadmin using a python module because of an arcpy script, but I am unsure of how to get the pgadmin connection parameters. I think it may be some kind of file in a directory, but I am unsure. This pgadmin database is on a windows machine.

share|improve this question
Do you mean saved connections to postgresql database that you can access with pgadmin. Information about these connections can be found from a pgpass.conf file that is located in %appdata%/postgresql folder when using Windows (winXP: C:\Documents and Settings\<user>\Application Data\postgresql, win7: C:\Users\<user>\AppData\Roaming\postgresql). – LauriK Dec 5 '12 at 14:23
You mean to reach postgis table via python? – Aragon Dec 5 '12 at 14:58
yes. Essentially I need to use more complex sql queries to handle duplicates which I do not want to delete buy rather modify and it seems to me that psql would be easier than converting my shapefile to gdb and then back to shapefile to handle this. – Carl Carlson Dec 5 '12 at 15:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.