Re: Sorting Challenge - Mailing list pgsql-novice

From Bruno Wolff III
Subject Re: Sorting Challenge
Date
Msg-id 20050831033342.GB3597@wolff.to
Whole thread Raw
In response to Sorting Challenge  (<operationsengineer1@yahoo.com>)
Responses Re: Sorting Challenge
List pgsql-novice
On Tue, Aug 30, 2005 at 15:58:40 -0700,
  operationsengineer1@yahoo.com wrote:
>
> i have a lot more data like this, but i want to keep
> it simple.  the first two alphas represent an area and
> the foloowing digit(s) represent a unique id.
>
> the data is currently held in a text field.

It generally isn't a good idea to store multiple fields in one column.
You should probably split this into two columns unless there is a significant
performance problem with doing so.

If there is than you might try creating an operator class that properly
compares these strings. Then you can use that operator class to do sorts
or create btree indexes.

pgsql-novice by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: pgsql installation problem!
Next
From:
Date:
Subject: Re: Sorting Challenge