The thread was referring to a grammar that's used for documentation, not
the actual one used to generate code.
The actual grammar rule is here:

https://github.com/geotools/geotools/blob/94377f6769f14d2225427c73c99bb714e9e5c32a/modules/library/cql/src/main/jjtree/ECQLGrammar.jjt#L298

So grammar wise, it seems that anything can be used as long as it's double
quoted (single quotes mark a string literal instead).
That however does not automatically mean one can freely use whatever
character in identifiers in a WMS request, there is also the
request parsing involved, the potential SQL encoding of the filter and so
on.
It could break at any point in the chain. If you or anyone in your group
can set up a developer environment, let us know, we can
give you some quick indications on where to set the breakpoints

Cheers
Andrea



On Sun, Apr 25, 2021 at 12:25 PM David Persson <persso...@gmail.com> wrote:

> Hi,
>
> Yes, the request is url-encoded. The ECQL parser (geoserver log
> level==debug) gives "..5918, VERSION=1.1.1, SERVICE=WMS, TRANSPARENT=true,
> CQL_FILTER='Datafångstmetod' = 'Karta över Hagbysjön och Borsten 1950.
> Handdig'}" and the postgresql logs "..FROM
> "public"."sokvyx_djupdata_djuppunkter_vy_2" WHERE 0 = 1" instead of "WHERE
> <proper statement>" when we enclose the attribute and value in single
> quotation marks. And we then receive a WMS image without features. (If use
> double quotation marks the Geoserver debug log mentions that the filter
> could not be parsed). So it looks right from Geoservers debug logs but
> evidently the right WHERE isn't sent to postgresql (or postresql doesn't
> throw an error for this but merely "WHERE 0 = 1")
>
> It's the same for attributes with a space in the name as with high ASCIIS
> like "Datafångstmetod".
>
> (These queries work well when put directly to postgresql)
>
> I saw this thread
> http://osgeo-org.1560.x6.nabble.com/ECQL-with-space-in-attribute-name-td5311652.html
> which indicates that at least spaces in attribute names are impossible for
> ecql, period, so maybe this is the case and the same for high ASCIIS?
>
> Regards
>
> On Thu, Apr 22, 2021 at 4:42 PM Ian Turton <ijtur...@gmail.com> wrote:
>
>> Did you try urlencoding the filter? in general it's a bad idea to have
>> spaces in your table or column names. Failing that, you'll need to look at
>> the log file and see if the request is failing in the ECQL parser or the
>> query sent to PostGIS.
>>
>> Ian
>>
>> On Thu, 22 Apr 2021 at 15:14, David Persson <persso...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> We've published layers in geoserver based on postgresql views where some
>>> columns contain spaces and å ä ö currently. Right now we are trying to
>>> employ ecql filters with getMap requests and are finding it hard/impossible
>>> to receive an expected reply when the query contains an attribute (column
>>> name in the view / property) that contains å ä ö or a space.
>>>
>>> We've tried a number of combinations with single and double quotes
>>> around the property and property + value . If the property has single
>>> quotation marks aroun, or the property and value have single quotations
>>> around them, the getmap is succesfull but the image returned contains no
>>> features even if expected to have them.
>>>
>>> If seemingly any combination of double quotation marks ( " ) are
>>> employed we get an ecql exception.
>>>
>>> (spaces and high asciis are okay as values to search for)
>>>
>>> Is there any way to filter a getMap on a property that contains spaces
>>> or high ASCIIs?
>>>
>>> Friendly regards,
>>> David.
>>> _______________________________________________
>>> Geoserver-users mailing list
>>>
>>> Please make sure you read the following two resources before posting to
>>> this list:
>>> - Earning your support instead of buying it, but Ian Turton:
>>> http://www.ianturton.com/talks/foss4g.html#/
>>> - The GeoServer user list posting guidelines:
>>> http://geoserver.org/comm/userlist-guidelines.html
>>>
>>> If you want to request a feature or an improvement, also see this:
>>> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>>>
>>>
>>> Geoserver-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>>
>>
>> --
>> Ian Turton
>>
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines:
> http://geoserver.org/comm/userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>


-- 

Regards, Andrea Aime

== GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf
Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa
(LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549
http://www.geo-solutions.it http://twitter.com/geosolutions_it
------------------------------------------------------- *Con riferimento
alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 -
Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni
circostanza inerente alla presente email (il suo contenuto, gli eventuali
allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i
destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per
errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le
sarei comunque grato se potesse darmene notizia. This email is intended
only for the person or entity to which it is addressed and may contain
information that is privileged, confidential or otherwise protected from
disclosure. We remind that - as provided by European Regulation 2016/679
“GDPR” - copying, dissemination or use of this e-mail or the information
herein by anyone other than the intended recipient is prohibited. If you
have received this email by mistake, please notify us immediately by
telephone or e-mail.*
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to