Re: [HACKERS] I don't like LIKE
От | Tom Lane |
---|---|
Тема | Re: [HACKERS] I don't like LIKE |
Дата | |
Msg-id | 27861.928880292@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | I don't like LIKE (Thomas Lockhart <lockhart@alumni.caltech.edu>) |
Список | pgsql-hackers |
Thomas Lockhart <lockhart@alumni.caltech.edu> writes: > postgres=> select * from t1 where i like '2'; > ERROR: pg_atoi: error in "2�": can't parse "�" > I'll guess that, even though there isn't a wildcard to pattern match, > MakeIndexable() is adding a trailing \377 to the string? Yup. This is an example of my point the other day: we shouldn't be adding those index restriction clauses in the parser, but much later on after type conversions have settled down and we know what we're dealing with. I don't think there's a good quick-fix, we'll just have to do it right. If you use variables to prevent makeIndexable from triggering, you will find that the system will indeed takeint4 like int4float4 like float4float8 like float8 which I find surprising, seeing as how there are no such operators. Automatic anything->text conversion, apparently. I wonder whether this isn't being a little too free with auto conversion. regards, tom lane
В списке pgsql-hackers по дате отправления: