From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> |
Cc: | Postgres Hackers List <hackers(at)postgreSQL(dot)org> |
Subject: | Re: [HACKERS] I don't like LIKE |
Date: | 1999-06-08 22:18:12 |
Message-ID: | 27861.928880292@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)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 take
int4 like int4
float4 like float4
float8 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 1999-06-08 22:28:43 | Re: [HACKERS] Re: Release schedule |
Previous Message | Bruce Momjian | 1999-06-08 21:47:58 | Re: [HACKERS] Re: Release schedule |