[osmosis-dev] Running osmosis on a specific Postgresql schema
Brett Henderson
brett at bretth.com
Tue Sep 18 12:33:50 BST 2012
Hi Jocelyn,
On 13 September 2012 05:09, Jocelyn Jaubert <jocelyn.jaubert at gmail.com>wrote:
> Hi,
>
> I would like to use osmosis on a schema of a Postgresql database. I'm
> currently doing this by setting this:
> ALTER USER osmosis SET search_path TO osmosis,public;
>
> But it isn't really useful as I would like to have different osmosis
> schema in the same database - the idea is to have a different country
> or French region inside each. I could have a different user for each
> schema, bit I would prefer not to have to.
>
>
> So, it is possible to specify a schema when running
> osmosis --write-pgsql-change ?
>
It's not supported in the current implementation.
It doesn't look easy to implement. Osmosis uses standard JDBC
functionality to access the database, and it looks like you have to issue
an explicit query such as "set search path to 'schema'" to change the
schema. Given that Osmosis uses data sources and Spring Framework wrapper
classes, it may be difficult to find a way to issue that statement on
creation of all connections.
Is it possible to explicitly specify the schema name every time you specify
a table? If so, that would be possible but would require some significant
code changes to propagate the schema name through to everywhere that builds
query strings.
I'm not keen to do this myself, but I'm more than happy to accept patches.
Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20120918/1442843b/attachment.html>
More information about the osmosis-dev
mailing list