Accessing PostGIS Features in PyCharm Database Navigator

I am trying to write scripts that use PostGIS features using PyCharm Database Navigator.

PostGIS and PostgreSQL were installed using Homebrew on Mac.

The debugger does not recognize any functions that are loaded as part of the PostGIS extensions for PostgreSQL and throws errors when trying to run the script. The creation of a simple table with a geometry type is not done, whereas the same command is executed in PSQL.

Do I need to do any special database connection configuration?

+3


source to share


2 answers


At the same time the same issue occured (postgis queries work in psql but crash in PyCharm DB console). It looks like a bug in PyCharm 5 - upgrading to PyCharm 2016 fixed the issue. There is a related bug in the JetBrains buffer tracker with a bug against IntelliJ Idea of ​​the same generation as PyCharm 5.



+2


source


Just stumbled upon this thing in PyCharm 2016.3.1. This JetBrains support article led to a solution: if you are working in a schema other than the public one, you need to add the publication to the search path, the query is stored there as a PostGIS type.



This allowed me to work with formulas and types geography

.

+1


source







All Articles