Add option wich specify a schema name for pg tables #4144
Comments
Author: jburgess777[at]googlemail.com I am not particularly familiar with schemas but I wonder if the same effect could be achieved more easily by just setting search path on each connection:
|
Author: rodolphe[at]quiedeville.org Yes it is possible to this way too, you're right. |
Author: rodolphe[at]quiedeville.org I look to the code and IMHO it's not really simpliest to set the search_path on each db connection, but if you definitely prefer this solution I can write a new patch in that way. Please let me know. |
Author: rodolphe[at]quiedeville.org I found a problem with using search_path, as we use postgis we need to access postgis tables in 'public' schema, so we need to set the searchpath as 'wanted_schema,public'. But if the user is not allowed in 'wanted_schema' all the actions will occurs in 'public' schema. If we use the qualified table name 'wanted_schema.tablename' an error will occurs. I think it's better to have an error than action in non wanted schema. |
Author: Ptigrouick Hello. Thank you Rodolphe for this new enhancement I need. |
Author: Ptigrouick I think it would be great if this enhancement could be inserted into osm2pgsql svn trunk. Do you know who is the one to ask for this ? |
Author: rodolphe[at]quiedeville.org I'll test your patch as soon as possible. |
Author: loki2000[at]inbox.ru Hello! Could you plz include this patch in some build next time? |
Author: pnorman Closing in favour of GH issues osm2pgsql-dev/osm2pgsql#173 osm2pgsql-dev/osm2pgsql#279 osm2pgsql-dev/osm2pgsql#619. Doing this right is harder than expected, see GH issues for details. |
Reporter: rodolphe[at]quiedeville.org
[Submitted to the original trac issue database at 10.41am, Monday, 12th December 2011]
Hi please found here a patch that add a new option '-g' (better letter wan be choosen) to specify the schema name where to create table instead of 'public'. It's a useful feature in postgres.
The text was updated successfully, but these errors were encountered: