Let's say I'm exporting features from my PostGIS DB like so:
SELECT ST_AsGeoJSON(*)::jsonb
FROM planet_osm_line
WHERE [conditions]
What I'm trying to achieve here is to include the "id" property associated with the way from planet_osm_ways.
Now, I know that I can create a primary key and be done with it but I want to stick to the actual information as much as possible.
Is this too much of a hassle and I should just stick to creating a manual primary key, or is it fairly easy to do?
How can I make the connection between the two tables?
I tried to do an inner join but realized that planet_osm_ways.nodes is of type bigint[] and can't be compared to planet_osm_line.way.