Re: I have a question about using index in order statement.

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: I have a question about using index in order statement.
Дата
Msg-id 472B5B05.1060201@enterprisedb.com
обсуждение исходный текст
Ответ на Re: I have a question about using index in order statement.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: I have a question about using index in order statement.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Tom Lane wrote:
> The basic reason that there's a problem here is that the parser is
> playing fast and loose by generating ORDER BY information that cites
> "text < text" as the sort operator but applies it to a bare varchar
> Var node.  So I thought about a Plan B of changing the parser to put
> a correct RelabelType on the sort key.  I'm not sure of all the
> implications of that, though, and you could argue that it's an
> initdb-forcing change (because stored rules involving ORDER BY on
> varchar columns would need to change to work right).  Seems a bit
> late in the 8.3 cycle for that.

I think mentioning it in the release notes would be enough. You would
just have to recreate the rules to make them work again, right?

> I guess the right answer is to fix equivclass.c to strip RelabelTypes,
> and hope to maybe take that out again someday when all this gets cleaned
> up.

That certainly looks like the easier solution. We still strip
RelabelTypes in many places anyway, so doing it in one more place
doesn't seem too bad to me.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

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

Предыдущее
От: "Felipe Amezquita"
Дата:
Сообщение: could not open relation
Следующее
От: Jeff Davis
Дата:
Сообщение: tsvector that can't be dumped/reloaded in 8.3beta