Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I get such errors when using these functions, what's is wrong?

pgdb=# SELECT distance('foo','zoo');
ERROR:  parse error - invalid geometry
LINE 1: SELECT distance('foo','zoo');
                        ^
HINT:  You must specify a valid OGC WKT geometry type such as POINT, LINESTRING or POLYGON
pgdb=# 
pgdb=# 
pgdb=# SELECT difference('foo','zoo');
ERROR:  parse error - invalid geometry
LINE 1: SELECT difference('foo','zoo');
                          ^
HINT:  You must specify a valid OGC WKT geometry type such as POINT, LINESTRING or POLYGON

May be these functions are not installed at all?

share|improve this question
    
distance and difference are not for strings, they are for geometry types (just as the error messages says). Why do you think they would operate on strings? –  a_horse_with_no_name Jan 18 '13 at 13:37
1  
@a_horse_with_no_name: I think he is referring to the fuzzystrmatch module which has indeed a difference() function. –  ypercube Jan 18 '13 at 13:49
1  
@ypercube: didn't know that, thanks. So in that case, the module must first be installed using create extension fuzzystrmatch –  a_horse_with_no_name Jan 18 '13 at 15:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.