Re: index not used in ( varchar = text )

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: index not used in ( varchar = text )
Дата
Msg-id 3085.1046097336@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: index not used in ( varchar = text )  ("Gaetano Mendola" <mendola@bigfoot.com>)
Список pgsql-admin
"Gaetano Mendola" <mendola@bigfoot.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

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Donald Fraser"
Дата:
Сообщение: Bugs with rules on views/tables: permission denied
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bugs with rules on views/tables: permission denied