[Cubicweb] Bug in RQL SUBSTRING

Adrien Di Mascio adimasci at gmail.com
Fri Aug 9 11:41:04 CEST 2013


Hi,

It's not a "bug". The semantic is the same as the one of the "substr"
function of postgres and is directly mapped on it. See
logilab.database.__init__ for more details.

It should be documented this way.

Cheers,
Adrien.
Le 9 août 2013 09:52, "Yann Cointepas" <yann at cointepas.net> a écrit :

> Hi,
>
> In cubicweb 3.17.3, when I use SUBSTRING( string, start, length ), the
> result size is length - 1 if start = 0. For instance, the following request
> return lines with 2 and 3 :
>
> Any LENGTH( SUBSTRING( SC, 0, 3 ) ), LENGTH( SUBSTRING( SC, 1, 3 ) ) WHERE
> S subject_code SC
>
> Regards,
>
>       Yann
>
> _______________________________________________
> Cubicweb mailing list
> Cubicweb at lists.cubicweb.org
> http://lists.cubicweb.org/mailman/listinfo/cubicweb
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20130809/d8660cf5/attachment-0055.html>


More information about the Cubicweb mailing list