Re: [sqlite] Affinity conversions and BLOB values

2019-06-09 Thread Keith Medcalf
On Sunday, 9 June, 2019 08:15, Manuel Rigger wrote: >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

Re: [sqlite] Affinity conversions and BLOB values

2019-06-09 Thread Manuel Rigger
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,

Re: [sqlite] Affinity conversions and BLOB values

2019-06-09 Thread Keith Medcalf
On Sunday, 9 June, 2019 05:20, Manuel Rigger 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 + is different from by itself generally speaking is in an

Re: [sqlite] Affinity conversions and BLOB values

2019-06-09 Thread Keith Medcalf
On Sunday, 9 June, 2019 05:20, Manuel Rigger wrote: >Consider the following example: >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 >I would expect that a row with a value 0 is returned. I suspe

[sqlite] Affinity conversions and BLOB values

2019-06-09 Thread Manuel Rigger
Hi everyone, Consider the following example: 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 I would expect that a row with a value 0 is returned. I suspect that this is a misunderstanding on my side,