I use PostgreSQL 9.2 but geometry_column table not automatically exist like spatial_ref_sys table, but if I use PostgreSQL 9.1 it's exist. How to make geometry_column automatically exist in PostgreSQL 9.2? because I also need to use pg_routing

  • Check the versions (SELECT PostGIS_version()). Until PostGIS 1.5, geometry_columns was a TABLE, but in 2.0 it was changed to a VIEW. – Mike T Apr 11 '15 at 10:44

GIS functions and the geometry_column, spatial reference tables etc do not exist by default in PostgreSql. You need to install the PostGIS extension (which you can add to an existing instance of PostgreSql or add when you install a fresh instance of PostgreSql).

Go to the PostGIS Getting Started documentation and follow the directions on how to CREATE EXTENSION, or use EnterpriseDB's 'Stack Builder' utility. Start Stack Builder and highlight the PostGIS option relevant to your installation of PostrgreSql (you can have more than one version on a machine).

The easiest way to setup PostGIS is to use the precompiled installer bundles that allow you to add the PostGIS and pgRouting extensions on installation. These are available from EnterpriseDB or can be downloaded from the PostGIS site. The postGIS link explains a number of options for obtaining PostGIS.

  • I already use postgis 2.0 and pg_routing, but my database doesnt show up on my css page, is there any different script between postgreSQL 9.2 and 9.1 to connect with css page (.map file) ?? – Berry Junanda Apr 13 '15 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.