Thread: Strage behavior

Strage behavior

From
Fernando Schapachnik
Date:
Sorry, I'm resending due to wrong subject.

-------------

Hello:
    First of all, forgive me if this is not the appropiate list
for my problem.

    What happens is: 6.5.0 running whitout problem for a very
long time. Suddenly:

select * from aliases where alias ~'claudia.gonzalez' \g
alias           |receptores
----------------+----------
claudia.gonzalez|claudia
(1 row)

    BUT:

select * from aliases where alias ='claudia.gonzalez' \g
alias|receptores
-----+----------
(0 rows)

    Also:

select * from aliases where alias~'^claudia.gonzalez$' \g
alias|receptores
-----+----------
(0 rows)

 select * from aliases where alias~'claudia.gonzalez$' \g
alias           |receptores
----------------+----------
claudia.gonzalez|claudia
(1 row)


    Seems like there is some kind of unvisible char at the front.

    Any ideas? TIA!

Fernando P. Schapachnik
Administración de la red
VIA NET.WORKS ARGENTINA S.A.
fschapachnik@vianetworks.com.ar
----- End of forwarded message from Fernando Schapachnik -----

Re: Strage behavior

From
Tom Lane
Date:
Fernando Schapachnik <fpscha@ns1.via-net-works.net.ar> writes:
> select * from aliases where alias~'^claudia.gonzalez$' \g
> alias|receptores
> -----+----------
> (0 rows)

>  select * from aliases where alias~'claudia.gonzalez$' \g
> alias           |receptores
> ----------------+----------
> claudia.gonzalez|claudia
> (1 row)

>     Seems like there is some kind of unvisible char at the front.

I think you are getting bitten by the LIKE-index-optimization problem.
Are you running in a non-ASCII locale?

There's a good deal of traffic concerning this issue in the archives,
so I won't repeat it ...

            regards, tom lane

Re: Strage behavior

From
Fernando Schapachnik
Date:
En un mensaje anterior, Tom Lane escribió:
> Fernando Schapachnik <fpscha@ns1.via-net-works.net.ar> writes:
> > select * from aliases where alias~'^claudia.gonzalez$' \g
> > alias|receptores
> > -----+----------
> > (0 rows)
>
> >  select * from aliases where alias~'claudia.gonzalez$' \g
> > alias           |receptores
> > ----------------+----------
> > claudia.gonzalez|claudia
> > (1 row)
>
> >     Seems like there is some kind of unvisible char at the front.
>
> I think you are getting bitten by the LIKE-index-optimization problem.
> Are you running in a non-ASCII locale?

Yes, I am.

>
> There's a good deal of traffic concerning this issue in the archives,
> so I won't repeat it ...

Now I know the keyword :) I will search the archives. Thanks!



Fernando P. Schapachnik
Administración de la red
VIA NET.WORKS ARGENTINA S.A.
fschapachnik@vianetworks.com.ar
Conmutador: (54-11) 4323-3333 - Soporte: 0810-333-AYUDA