Opened 7 years ago

Closed 6 years ago

#4682 closed defect (fixed)

Errors in SQL definition

Reported by: redfox@… Owned by: geocoding@…
Priority: minor Milestone:
Component: nominatim Version: 2.0
Keywords: Cc:

Description

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?

Change History (1)

comment:1 Changed 6 years ago by Sarah Hoffmann

Resolution: fixed
Status: newclosed

Removed.

Note: See TracTickets for help on using tickets.