Re: BUG #1905: When a column with the chkpass datatype is used in a where clause it returns invalid results - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1905: When a column with the chkpass datatype is used in a where clause it returns invalid results
Date
Msg-id 3974.1127487709@sss.pgh.pa.us
Whole thread Raw
In response to BUG #1905: When a column with the chkpass datatype is used in a where clause it returns invalid results  ("Trevor Tingey" <ttingey@gmail.com>)
List pgsql-bugs
"Trevor Tingey" <ttingey@gmail.com> writes:
> I ran the following queries and got unexpected results:

> UPDATE Account
> SET "Password" = 'password1'
> WHERE "AccountName" = 'Trevor'

> SELECT *
> FROM Account
> WHERE "AccountName" = 'Trevor'
> AND "Password" = 'password2'

> (I ran them individually)

> The Select query unexpectedly returned a result.

This is not a bug --- chkpass limits passwords to 8 significant
characters, so the above two values are in fact equal so far as
the datatype is concerned.

(The documentation probably ought to point that out...)

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Trevor Tingey"
Date:
Subject: BUG #1905: When a column with the chkpass datatype is used in a where clause it returns invalid results
Next
From: Bruce Momjian
Date:
Subject: Re: CVS Head: Pg_ctl bug?