Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Table planet_osm_nodes is hardcoded in middle-pgsql.c #4384

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 0 comments
Closed

Table planet_osm_nodes is hardcoded in middle-pgsql.c #4384

openstreetmap-trac opened this issue Jul 23, 2021 · 0 comments

Comments

@openstreetmap-trac
Copy link

Reporter: kay_D
[Submitted to the original trac issue database at 3.01am, Monday, 30th April 2012]

Using osm2pgsql SVN version 0.80.0 (32bit id space), my db prefix is just "planet", not "planet_osm", and I get errors in the postgresql-9.1-main.log:

2012-04-29 19:04:48 CEST ERROR: relation "planet_osm_nodes" does not exist at character 16
2012-04-29 19:04:48 CEST STATEMENT: select id from planet_osm_nodes limit 1

The error line is in osm2pgsql/middle-pgsql.c[Rev. 27899] line 1273:

res = PQexec(sql_conn, "select id from planet_osm_nodes limit 1" );

It should be referred to the table[i] array initialized earlier instead. Sadly, my c knowledge has deteriorated seriously, so I'm afraid to break stuff while fiddling with string allocation problems.

I rated the bug as "major" because apparently the error is just ignored, but it is used to test the db and tools against 64 bit int conformance, a problem which is to appear more frequently throughout the next year. (Otherwise I'd considered the bug minor.) The bug was introduced in Rev 26437 ("issue error message when trying to append to 32bit table with 64bit program...").

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant