Re: [GENERAL] Failed to autoconvert '1' to text.

2013-09-06 Thread Szymon Guz
On 6 September 2013 10:33, Richard Huxton wrote: > On 06/09/13 09:13, Szymon Guz wrote: > >> Hi, >> why isn't 'aa' always treated as string? >> > > with x as ( >>select >>'1' a, >>'2' b >> ) >> SELECT levenshtein(a, b), length(a) >> FROM x; >> >> ERROR: failed to find conversion fun

Re: [GENERAL] Failed to autoconvert '1' to text.

2013-09-06 Thread Richard Huxton
On 06/09/13 09:13, Szymon Guz wrote: Hi, why isn't 'aa' always treated as string? with x as ( select '1' a, '2' b ) SELECT levenshtein(a, b), length(a) FROM x; ERROR: failed to find conversion function from unknown to text Why should I cast '1' to '1'::TEXT to satisfy a function

[GENERAL] Failed to autoconvert '1' to text.

2013-09-06 Thread Szymon Guz
Hi, why isn't 'aa' always treated as string? While testing function for levenshtein distance I've noticed that: with x as ( select '1' a, '2' b ) SELECT levenshtein(a, b), length(a) FROM x; ERROR: failed to find conversion function from unknown to text with x as ( select '1'::TEXT a,