Opened 7 years ago

Closed 7 years ago

#4384 closed defect (fixed)

Table planet_osm_nodes is hardcoded in middle-pgsql.c

Reported by: kay_D Owned by: jburgess777@…
Priority: major Milestone:
Component: osm2pgsql Version:
Keywords: Cc: kay_D

Description

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...").

Change History (2)

comment:1 Changed 7 years ago by kay_D

Cc: kay_D added

comment:2 Changed 7 years ago by amm

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.