[Tile-serving] [openstreetmap/osm2pgsql] Create primary keys (#1216)

Jochen Topf notifications at github.com
Tue Jun 16 19:04:33 UTC 2020


This is pretty easy to achieve using the new flex backend. You can define your own table columns there: 

```
...
{ column = 'id', type = 'serial', create_only = true },
...
```

The type `serial` is simply the postgresql type which creates an autoincrement int column, the `create_only` flag tells osm2pgsql to not try to put any data in there. Then, after the first import, call `CREATE UNIQUE INDEX` to build yourself an index.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1216#issuecomment-644955188
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20200616/b53c9872/attachment.htm>


More information about the Tile-serving mailing list