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

Jochen Topf notifications at github.com
Wed Jun 17 07:42:18 UTC 2020


@pnorman As @lonvia mentioned a serial column is always NOT NULL, but you can also set the `not_null` column option to `true` if you want to force this for any column.

@G-Guillard There is no such thing as "the default" for the flex backend. The user has to say which columnes they want. But this is certainly something we could document better and put into example config files or so. I have put this on my todo list.

There is another consideration here: Traditionally the `osm_id`s are not necessarily unique in osm2pgsql tables. But with the flex backend this is different. It is possible to configure it in a way that the `osm_id` column (or whatever you name it) is unique. In which case you probably want to use that as your primary key column to save the overhead of an extra column.

-- 
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-645209736
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20200617/c28c05b7/attachment-0001.htm>


More information about the Tile-serving mailing list