Closed florence-crl closed 2 years ago
It fails here:
SELECT regexp_split_to_table(extversion, e'\\.') FROM pg_extension WHERE extname = 'postgis';
I thought we populated the table but guess not:
root@localhost:26257/defaultdb> SELECT * FROM pg_extension WHERE extname = 'postgis';
oid | extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
------+---------+----------+--------------+----------------+------------+-----------+---------------
(0 rows)
root cause is #80012
(marking as duplicate)
Workaround
To unblock this error, you can build osm2pgsql
with a patch.
replace https://github.com/openstreetmap/osm2pgsql/blob/master/src/pgsql.cpp#L228-L244 with {3, 0} (we are 3.0.1)
follow https://github.com/openstreetmap/osm2pgsql#building
Describe the problem I hit the error below when I ran step 3 documented on this page: Migrate from OpenStreetMap
ERROR: The postgis extension is not enabled on the database 'defaultdb'. Are you using the correct database? Enable with 'CREATE EXTENSION postgis;'
To Reproduce
0.a. create a local CRDB 22.1.1 cluster 0.b. install
osm2pgsql
2.b create a database to hold the Australia map data:
2.c. Run this recommended step that is mentioned in the error message
Error above is returned
Expected behavior A successful run that looks like
Additional data / screenshots
Environment:
Additional context I could not Import the OpenStreetMap data.
A user encountered this error using a serverless cluster
Jira issue: CRDB-16748