On Fri, 2003-03-14 at 06:26, valerian wrote:
> I have an indexed column called home_phone, which is of type bigint.
> How can I search this column efficiently, using LIKE queries? For
> example:
>
> test=> SELECT id FROM user WHERE home_phone LIKE '407%'::bigint;
> ERROR: Bad int8 external representation "407%"
try something like
where home_phone::text like '407%'
or alternatively harness the immense power of algebra to achieve your
devious ends :)
HTH,
James.