>CREATE TABLE public.base (
> nombre varchar(255),
> calle varchar(255),
> puerta int2,
> resto varchar(255),
> lid int2,
> area varchar(4),
> telefono varchar(10)
>)
>CREATE INDEX base_dir ON base USING btree (lid, calle, puerta);
>
>And trying the following select:
>
>select * from base where lid = 457 and calle = 'MALABIA' and puerta = 10
I think its because lid and puerta are int2's and 457 and 10 are
int4's. Try lid = '457'::int2 and puerta = '10'::int2. To use an index
the variables have to match types exactly.
--- Adam Kavan
--- akavan@cox.net