osmosis icon indicating copy to clipboard operation
osmosis copied to clipboard

Import to custom postgresql schema name (other then "public")

Open alexey-gl opened this issue 3 years ago • 2 comments

Hello! Does osmosis support import to custom postgresql schema name? Browsing the code I didn't found such option except playing with postgres search_path setting.

alexey-gl avatar Oct 25 '21 13:10 alexey-gl

HI @alexey-gl,

in theory it does support it if you give it the postgresSchema option at the command line as stated in the documentation, but it doesn't seem to work.

I've found your issue trying to find someone else that had done that did it successfully or trying to find more documentation on that functionality.

belug23 avatar Oct 02 '23 14:10 belug23

Ok, I've found my error, the user I was using didn't have access to the schema, so it wasn't able to find the tables.

If other people are trying to find how to do it, here's an example for the read option, other pgsql or pgsimp function work the same:

osmosis --read-pgsql database=<databasename> user=<username> password=<password> postgresSchema=<schema> --dataset-dump --write-pbf output.pbf

And don't forget to grant access to the space to the user you're using.

belug23 avatar Oct 02 '23 17:10 belug23