Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

can't create table - ERROR: type "hstore" does not exist #3987

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 4 comments
Closed

can't create table - ERROR: type "hstore" does not exist #3987

openstreetmap-trac opened this issue Jul 23, 2021 · 4 comments

Comments

@openstreetmap-trac
Copy link

Reporter: hadmut[at]danisch.de
[Submitted to the original trac issue database at 10.06pm, Sunday, 28th August 2011]

Hi,

I am trying to create a new database under postgresql 9.1rc1 with osmosis 0.39 and

psql -d osm -f pgsnapshot_schema_0.6.sql

getting the error message
psql:pgsnapshot_schema_0.6.sql:52: ERROR: type "hstore" does not exist

@openstreetmap-trac
Copy link
Author

Author: hadmut[at]danisch.de
[Added to the original trac issue at 4.06pm, Monday, 29th August 2011]

When trying it the other way, i.e.

psql -d osm -f pgsimple_schema_0.6.sql
psql -d osm -f pgsnapshot_schema_0.6_upgrade_5-6.sql

I get the error message

Caused by: org.postgresql.util.PSQLException: ERROR: column "tags" of relation "nodes" does not exist

and pgsimple_schema_0.6.sql allone cannot be used since schema_info=5 is not accepted by osmosis

@openstreetmap-trac
Copy link
Author

Author: species
[Added to the original trac issue at 2.17pm, Monday, 19th September 2011]

Is hstore enable for the postgres user owning the database?
you can view enabled extensions with:
sudo -u postgres psql -U gis # where "gis" is the owner of the DB you want import into
SELECT * FROM pg_available_extensions ;

i had the same problem with osm2pgsql and psql9.1rc1, and after
CREATE EXTENSION hstore;
as the user owning the DB (hat to set him superuser before) the import worked.

@openstreetmap-trac
Copy link
Author

Author: hadmut[at]danisch.de
[Added to the original trac issue at 2.20pm, Monday, 19th September 2011]

Yup, CREATE EXTENSION solved the problem.

They had changed the way to create extensions in postgresql 9.1 without documenting it.

So all those HowTos about how to create an OSM database are wrong in this aspect if a newer version of pgsql is used.

@openstreetmap-trac
Copy link
Author

Author: stephankn
[Added to the original trac issue at 4.14pm, Tuesday, 16th October 2012]

no problem with osmosis, documentation is a wiki...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant