From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Gaetano Mendola" <mendola(at)bigfoot(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: index not used in ( varchar = text ) |
Date: | 2003-02-24 14:35:36 |
Message-ID: | 3085.1046097336@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
"Gaetano Mendola" <mendola(at)bigfoot(dot)com> writes:
>> You need to get rid
>> of the datatype ambiguity. "text = text" is a different operator from
>> "varchar = varchar".
> Yes I agree but was not like this in the Postgres 7.2.X version
That was a bug, or at least a horridly misdesigned behavior. The
operator chosen by the parser is "text = text" (because text is the
preferred datatype in the string class). Leaving aside any issues
about whether the parser's choice is correct, it is surely no business
of the planner to replace that choice with "varchar = varchar" ---
but that's what it was doing. The folly of this idea can be seen by
realizing that the same code would equally happily replace it with
"char = char", which has distinctly different semantics.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-02-24 14:42:44 | Re: Bugs with rules on views/tables: permission denied |
Previous Message | Donald Fraser | 2003-02-24 11:58:26 | Bugs with rules on views/tables: permission denied |