Just a wild guess, but I would imagine
a corrupt (old) index on the userid field would
cause this kind of behavior.
You could test this by dropping the index and
then rebuilding it.
Troy
>
> "pgsql-sql" <pgsql-sql(at)fc(dot)emc(dot)com(dot)ph> writes:
> > migrate=# select userid from users where userid = 'reynan(at)yahoo(dot)com';
> > userid
> > ---------------------
> > reynan(at)yahoo(dot)com
> > admin
> > (2 rows)
>
> That's a tad, um, startling :-(
>
> However, you haven't given us nearly enough information to have a shot
> at figuring out what's going on.
>
> regards, tom lane
>