Like on dates fails during cite wfs 1.1 tests againsg postgres 8.3

Description

Running the following wfs query against geoserver + postgres 8.3

xmlns=

service=
version=>

results in the following query:

, encode(asBinary(force_2d("surfaceProp
ertypointProperty"),'XDR'),'base6
4'), encode(asBinary(force_2d(
FROM
WHERE ( LIKE '20%10__ _::____' );

that works fine on my postgres 8.1.5, but fails with the following error message on gridlock's windows VM:

does not exist: timestamp with time zone ~~ unknown
LINE 1: ...icdateProperty" LIKE '20%-...
^
HINT: No matches the given name and argument type(s). You might need to add explicit type casts.

Modifying the query as follows (explicit cast of fields to varchar) make it work on pg 8.3 as well:

, encode(asBinary(force_2d("surfaceProp
ertypointProperty"),'XDR'),'base6
4'), encode(asBinary(force_2d(,
, "decimalProperty
dateProperty"::varchar LIKE '20%
10__' OR :
:varchar LIKE '20%10__ _::____' );

Environment

None

Activity

Show:
codehaus
April 10, 2015, 3:49 PM

CodeHaus Comment From: jdeolive - Time: Wed, 10 Jun 2009 16:30:28 -0500
---------------------
<p>Andrea, do you still have a patch sitting on your disk for this one?</p>

codehaus
April 10, 2015, 3:49 PM

CodeHaus Comment From: aaime - Time: Thu, 11 Jun 2009 08:52:03 -0500
---------------------
<p>Unfortunately I reverted it, since it was just a hack... but what I did was simply, pass down String.class as the context in visit(PropertyIsLike) when the expression being compared was encoded, and override the code that writes out a property in PostgisFilterToSql so that "::text" was added to it if the context was String.class</p>

<p>Imho we should have the dates be compared against a formatting in ISO format of the dates, the above approach assumes postgis will encode the date following the iso format, but that is not granted, I believe that depends on the national language setting.</p>

codehaus
April 10, 2015, 3:49 PM

CodeHaus Comment From: aaime - Time: Sun, 20 Mar 2011 06:20:27 -0500
---------------------
<p>Justin, something odd is going on... I've just run the CITE tests WFS 1.1 against postgres 8.4 and I get a full pass... full, this one does not show up, regardless of the old pg version..... Was the test removed or did it magically start working again?</p>

codehaus
April 10, 2015, 3:49 PM

CodeHaus Comment From: aaime - Time: Sun, 20 Mar 2011 06:23:05 -0500
---------------------
<p>Indeed something is odd in the run, the test is tc42.4, and it does not show up in my run results, whilst the other like related tests, tc42.1, tc42.2, tc42.3 are there...</p>

codehaus
April 10, 2015, 3:49 PM

CodeHaus Comment From: jdeolive - Time: Mon, 21 Mar 2011 09:04:57 -0500
---------------------
<p>Yeah, the test is commented out. There did not seem an easy way forward to fix the problem so i just decided to disable it I guess... although i can't remember explicitly doing so. If you want to reenable it edit the file cite_tools/tests/wfs-1.1.0/src/basic/GetFeature/GetFeature-POST.xml. Just search for tc42.4 and you will see the commented out test. After the change you need to recompile the cite tools. Or alternatively update the file under engine/scripts rather than tests. </p>

Assignee

Unassigned

Reporter

codehaus

Triage

None

Fix versions

None

Affects versions

Components

Priority

Medium
Configure