Skip site navigation (1) Skip section navigation (2)

Re: Sorting Challenge

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: operationsengineer1(at)yahoo(dot)com
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Sorting Challenge
Date: 2005-08-31 03:33:42
Message-ID: 20050831033342.GB3597@wolff.to (view raw or flat)
Thread:
Lists: pgsql-novice
On Tue, Aug 30, 2005 at 15:58:40 -0700,
  operationsengineer1(at)yahoo(dot)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.

In response to

Responses

pgsql-novice by date

Next:From: operationsengineer1Date: 2005-08-31 05:51:34
Subject: Re: Sorting Challenge
Previous:From: Bruno Wolff IIIDate: 2005-08-31 03:25:42
Subject: Re: pgsql installation problem!

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group