Hi all,

this could be done using the hstore concat operator "||". See [1] section
F.16.4. But I don't know if this is anywhat faster than a full reimport.

Greetings,
Julian Picht

[1] http://www.postgresql.org/docs/9.1/static/hstore.html

2011/12/18 Kai Krueger <[email protected]>

> On 12/17/2011 03:38 PM, Kay Drangmeister wrote:
> > Hi all
> >
> > The parking styles partially fail with the newly imported database.
> >
> > Am 25.11.2011 09:56, schrieb Kai Krueger:
> >> [...] progress on updating the software stack (The
> >> re-import will occur into a postgresql 9.1 database with the latest
> >> osm2pgsql) [...]
> >
> > Maybe it is due to the latest osm2pgsql.
> >
> >> The import is intended to occur with the default set of db columns
> >> together with the hstore extensions.
> >
> > The problem is that not all tags are present in the hstore any
> > more, unlike in the old database. The tags available in other
> > columns are left out in the hstore.
>
> It looks like the following commit to osm2pgsql might have been the issue:
>
> r25689 | giggls | 2011-03-24 09:25:24 -0600 (Thu, 24 Mar 2011) | 9 lines
>
> Minor rework of hstore functionality:
>
>
> * Do not add a key to the hstore column if there is an exclusive column for
>  this key by
> * Add an additional commandline switch to restore the original behaviour
>  to add any key
> * remove the "z_order" special key from hstore in any case
>
>
> I did not use the additional commandline switch to move back to the
> original behaviour.
>
> Coming to think of it, I thought I saw a commit changing the behaviour
> back again, but I can't find it anymore.
>
> >
> > Here is an example for the "amenity" tag missing:
> >
> > osm_mapnik=> select amenity,tags->'amenity' as "hstore-amenity" from
> > planet_polygon where osm_id=32550266;
> >  amenity | hstore-amenity
> > ---------+----------------
> >  parking |
> > (1 row)
> >
> > here is how it looked before the new import:
> >
> > osm_mapnik=> select amenity,tags->'amenity' as "hstore-amenity" from
> > planet_polygon where osm_id=32550266;
> >
> >  amenity | hstore-amenity
> > ---------+----------------
> >  parking | parking
> > (1 row)
> >
> > (If you happen to be a subscriber of mapnik-de there has been the
> > same issue with osm2pgsql, but it has been changed back to the old
> > behaviour. See thread here:
> >
> https://lists.openstreetmap.de/mailman/private/mapnik-de/2011-July/000067.html
> > login needed.)
>
> No I am not a subscriber, but why aren't those archives public?!
>
> >
> > Of course it is a space advantage not to repeat each tag existing
> > in a regular column in the "tags" hstore again, but on the other
> > side, stylesheets have to be always adapted if the osm2pgsql config
> > file is changed. Plus they will no longer be portable across servers
> > with different osm2pgsql configurations.
>
> OK, so the question is now what to do?
>
> >
> > Would it be possible to re-import the hstore?
>
> Does anyone know of an sql query that could be run to pull data from the
> normal columns and insert it into the hstore?
>
> I'd be somewhat reluctant to do a full re-import of the database.
>
> Kai
>
> >
> > Kind regards,
> > Kay
>
>
> _______________________________________________
> Maps-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/maps-l
>
_______________________________________________
Maps-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/maps-l

Reply via email to