Hi Keith,

I don't understand completely. So we agree that +c0 has no affinity.
However, you argue that c0 has BLOB affinity, if I understood correctly.
Why is that? I'd assume that it has TEXT affinity, since the table column
is declared as TEXT. Since applying TEXT affinity seems to be lossless, I
would expect it to be performed.

Best,
Manuel

On Sun, Jun 9, 2019 at 3:51 PM Keith Medcalf <kmedc...@dessus.com> wrote:

>
> On Sunday, 9 June, 2019 05:20, Manuel Rigger <rigger.man...@gmail.com>
> wrote:
>
> >CREATE TABLE t0(c0 TEXT);
> >INSERT INTO t0(c0) VALUES (x'41'); -- 'A' if converted to TEXT
> >SELECT (+ c0) IS c0 FROM t0; -- expected: 0, actual: 1
>
> Note also that the only place where +<column> is different from <column>
> by itself generally speaking is in an ORDER BY clause.  This is because
> although the "value" is unchanged, +<column> is an expression whereas
> <column> is a reference to a column.  Thus the optimizer can use the bare
> reference to a column (<column>) during index selection but will not use an
> expression (+<column>).
>
> ---
> The fact that there's a Highway to Hell but only a Stairway to Heaven says
> a lot about anticipated traffic volume.
>
>
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to