From 1e243f4907d77f2e7ead1ef7ec0eaa0e407d911b Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Thu, 2 Oct 2008 16:43:53 +0000 Subject: [PATCH] Ensure relate(g,g,p) is case insensitive. (#44) git-svn-id: http://svn.osgeo.org/postgis/branches/1.3@3049 b70326c6-7e19-0410-871a-916f4a2858ee --- lwgeom/lwgeom_geos_c.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lwgeom/lwgeom_geos_c.c b/lwgeom/lwgeom_geos_c.c index f74247e91..3d6896c1c 100644 --- a/lwgeom/lwgeom_geos_c.c +++ b/lwgeom/lwgeom_geos_c.c @@ -2458,6 +2458,15 @@ Datum relate_pattern(PG_FUNCTION_ARGS) patt = DatumGetCString(DirectFunctionCall1(textout, PointerGetDatum(PG_GETARG_DATUM(2)))); + /* + ** Need to make sure 't' and 'f' are upper-case before handing to GEOS + */ + for( i = 0; i < strlen(patt); i++ ) { + if( patt[i] == 't' ) patt[i] = 'T'; + if( patt[i] == 'f' ) patt[i] = 'F'; + } + + #ifdef PROFILE profstart(PROF_GRUN); #endif -- 2.40.0