I am wondering if I am doing something wrong or if this is a legitimate issue
with the code. I am trying to define my own table for insertion into the
database.
I have the following versions of software:
osm2pgsql version 2.0.0
Database version: 16.3
PostGIS version: 3.4
the table definition in question:
```
local pois = osm2pgsql.define_table({
name = 'pois',
ids = { type = 'node', id_column = 'id', type_column = 'obj_type' },
columns = {
{ column = 'name', type = 'text' },
{ column = 'tags', type = 'jsonb' },
{ column = 'geom', type = 'point', projection = srid, not_null
= true },
}
})
```
Error Response:
> ERROR: Error loading lua config: [string "..."]:14: Error in 'define_table':
> The table must contain a 'name' string field
I get the same error for the example definition in the manual.
```
local restaurants = osm2pgsql.define_table({
name = 'restaurants',
ids = { type = 'node', id_column = 'node_id' },
columns = {
{ column = 'name', type = 'text' },
{ column = 'tags', type = 'jsonb' },
{ column = 'geom', type = 'point' }
}})
```
--
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/discussions/2267
You are receiving this because you are subscribed to this thread.
Message ID: <osm2pgsql-dev/osm2pgsql/repo-discussions/[email protected]>_______________________________________________
Tile-serving mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/tile-serving