sorting library of congress numbers - Mailing list pgsql-general

From Rick Schumeyer
Subject sorting library of congress numbers
Date
Msg-id 010f01c4fe77$70306680$0200a8c0@dell8200
Whole thread Raw
Responses Re: sorting library of congress numbers  (Scott Marlowe <smarlowe@g2switchworks.com>)
Re: sorting library of congress numbers  (Mike Rylander <mrylander@gmail.com>)
List pgsql-general

I have a table where one of the columns is a library of congress number.

I would like to be able to ORDER BY this column.

 

Currently, the column is a varchar.  Unfortunately, a normal string comparison

will not work.

 

First, has anyone done this already?

 

If not, I’m thinking I would need to:

1)       define a new type to hold LOC numbers.

2)       write a function that determines less than, greater than

 

It seems like I’m missing something here.  I have not yet defined a new

type…is defining less/greater part of that process?

 

Is there a simpler way to do this?

 

Any advice is appreciated.

 

pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: need an advice on running Database
Next
From: Stuart Bishop
Date:
Subject: Re: Multiline plpython procedure