Re: best way to fetch next/prev record based on index

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: best way to fetch next/prev record based on index
Дата
Msg-id 87vfg6ps1t.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: best way to fetch next/prev record based on index  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
Список pgsql-performance
"Merlin Moncure" <merlin.moncure@rcsonline.com> writes:

> However, this would work:
> Create index on t(stackparam(array[a::text,b::text,c::text),
> array['char(2)', 'int', 'date')];

Well, I fear not all datatypes sort properly when treated as text. Notably
integers don't. "10" sorts before "2" for example. You could probably deal
with this with careful attention to each datatype you're converting if you're
interested in going to that length.

--
greg

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: best way to fetch next/prev record based on index
Следующее
От: "Merlin Moncure"
Дата:
Сообщение: Re: best way to fetch next/prev record based on index