1

I wrote the following code to psql (Sql Shell)

createdb -T template_postgis nyc;

but does not work because syntax error .

trying to make an example of the links related aim GeoServer. I have postgis 2.0 and postgresql 9.4

http://docs.geoserver.org/stable/en/user/gettingstarted/postgis-quickstart/index.html

  • 1
    windows or linux? - windows has a postgres +postgis stack installer bostongis.com/PrinterFriendly.aspx?content_name=postgis_tut01 will always create a template 'template_postgis20' with postgis extension enabled – Mapperz Sep 8 '15 at 20:24
  • For Windows. What should I do so ? I wrote codes as the following create extension postgis(topology etc) @Mapperz – develop Sep 8 '15 at 20:29
  • 1
    I use the installers here enterprisedb.com/products-services-training/pgdownload#windows 9.4 when the installer runs select postgis extension and template, you should see the postgis in the Extensions Tree under your created Database. see stackoverflow.com/questions/24981784/… – Mapperz Sep 8 '15 at 20:31
  • nyc database extension(3) plpgsql,postgis and postgis topology. I can see extensions. I'm learning new so How do I? @Mapperz – develop Sep 8 '15 at 20:49
  • 1
    The template_postgis is created by the PostGIS installer, I suggest you try to reinstall PostGIS using the installer indicated by @Mapperz. Do you have PgAdminIII? I find that utility invaluable at seeing what's in the database, if so, you should see your template_postgis database (which may have a different name) if you can't see the template there's something broken with the install and there's a more serious problem that is worthy of a new question. – Michael Stimson Sep 8 '15 at 22:54
1

Why aren't you just using?

CREATE EXTENSION postgis;

It's universal across all platforms for PostGIS 2.0+ unless your distro for some crazy reason did not include raster.

pgAdmin New extension drop down -- in extension section, shows extensions you have available you have not yet installed in your db.

enter image description here

  • I can see extension(3) (postgis and postgis topology) but I say new extension name but I cant see postgis and postgis tolopogy why ? so How can I installed my db ? I have pgAdmin 3. @LR1234567 – develop Sep 9 '15 at 7:02
  • Don't understand the question. Do you see them in the drop down or not? You just have to select the one you want and install. It's just GUI way of doing this from sql window CREATE EXTENSION postgis; – LR1234567 Sep 9 '15 at 7:53
  • or are you talking about the additional extensions I have showing. The address_standardizer_data_us, postgis_sfcgal are new in PostGIS 2.2. -- you can get experimental binaries here - postgis.net/windows_downloads (for windows). that page has them before I are package them in application stackbuilder installers – LR1234567 Sep 9 '15 at 7:56

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.