Re: best way to fetch next/prev record based on index - Mailing list pgsql-performance

From Greg Stark
Subject Re: best way to fetch next/prev record based on index
Date
Msg-id 87vfg6ps1t.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: best way to fetch next/prev record based on index  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: best way to fetch next/prev record based on index
Next
From: "Merlin Moncure"
Date:
Subject: Re: best way to fetch next/prev record based on index