[Geocoding] [OpenStreetMap] #4682: Errors in SQL definition
OpenStreetMap
trac at noreply.openstreetmap.org
Sun Nov 11 20:08:21 GMT 2012
#4682: Errors in SQL definition
-----------------------+-------------------------
Reporter: redfox@… | Owner: geocoding@…
Type: defect | Status: new
Priority: minor | Milestone:
Component: nominatim | Version: 2.0
Keywords: |
-----------------------+-------------------------
in sql/tables.sql
these lines are not needed since placex table is correctly created
{{{
alter table placex add column geometry_sector INTEGER;
alter table placex add column indexed_status INTEGER;
alter table placex add column indexed_date TIMESTAMP;
}}}
2012-11-02 20:51:10 CET ERROR: column "geometry_sector" of relation
"placex" already exists
2012-11-02 20:51:10 CET STATEMENT: alter table placex add column
geometry_sector INTEGER;
2012-11-02 20:51:10 CET ERROR: column "indexed_status" of relation
"placex" already exists
2012-11-02 20:51:10 CET STATEMENT: alter table placex add column
indexed_status INTEGER;
2012-11-02 20:51:10 CET ERROR: column "indexed_date" of relation "placex"
already exists
2012-11-02 20:51:10 CET STATEMENT: alter table placex add column
indexed_date TIMESTAMP;
geometry_sector() is not defined as a function then
{{{
update placex set geometry_sector = geometry_sector(geometry);
}}}
create an error
2012-11-02 20:51:10 CET ERROR: function geometry_sector(geometry) does
not exist at character 37
2012-11-02 20:51:10 CET HINT: No function matches the given name and
argument types. You might need to add explicit type casts.
2012-11-02 20:51:10 CET STATEMENT: update placex set geometry_sector =
geometry_sector(geometry);
indexed column seem to have been replaced by indexed_status 2 years ago
then
{{{
CREATE INDEX idx_placex_pendingbylatlon ON placex USING BTREE
(geometry_index(geometry_sector,indexed,name),rank_search) where
geometry_index(geometry_sector,indexed,name) IS NOT NULL;
CREATE INDEX idx_placex_interpolation ON placex USING BTREE
(geometry_sector) where indexed = false and class='place' and
type='houses';
}}}
creates error in pgsql
2012-11-11 18:26:05 CET ERROR: column "indexed" does not exist at
character 178
2012-11-11 18:26:05 CET STATEMENT: CREATE INDEX
idx_placex_pendingbylatlon ON placex USING BTREE
(geometry_index(geometry_sector,indexed,name),rank_search)
TABLESPACE tbl2 WHERE
geometry_index(geometry_sector,indexed,name) IS NOT NULL;
2012-11-11 18:29:21 CET ERROR: column "indexed" does not exist at
character 101
2012-11-11 18:29:21 CET STATEMENT: CREATE INDEX idx_placex_interpolation
ON placex USING BTREE (geometry_sector) TABLESPACE tbl2 WHERE indexed =
false and class='place' and type='houses';
idx_placex_interpolation in created later in sql/indices.src.sql but what
about idx_placex_pendingbylatlon?
--
Ticket URL: <https://trac.openstreetmap.org/ticket/4682>
OpenStreetMap <http://www.openstreetmap.org/>
OpenStreetMap is a free editable map of the whole world
More information about the Geocoding
mailing list