From: Greg Stark <gsstark@mit.edu>
To: Merlin Moncure <merlin.moncure@rcsonline.com>
Cc: gsstark@mit.edu
Cc: pgsql-performance@postgresql.org
Subject: Re: best way to fetch next/prev record based on index
Date: 29 Jul 2004 14:49:34 -0400
Message-ID: <87vfg6ps1t.fsf@stark.xeocode.com> (raw)
In-Reply-To: <6EE64EF3AB31D5448D0007DD34EEB34101AF11@Herge.rcsinc.local>
References: <6EE64EF3AB31D5448D0007DD34EEB34101AF11@Herge.rcsinc.local>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: gsstark@mit.edu, merlin.moncure@rcsonline.com
Subject: Re: best way to fetch next/prev record based on index
In-Reply-To: <87vfg6ps1t.fsf@stark.xeocode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox