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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Trevor Tingey" <ttingey(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1905: When a column with the chkpass datatype is used in a where clause it returns invalid results
Date: 2005-09-23 15:01:49
Message-ID: 3974.1127487709@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Trevor Tingey" <ttingey(at)gmail(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2005-09-23 19:56:09 Re: CVS Head: Pg_ctl bug?
Previous Message Mark Stosberg 2005-09-23 14:40:54 suggestion: fix 'now' -> CURRENT_TIMESTAMP