sorting library of congress numbers

From: "Rick Schumeyer" <rschumeyer(at)ieee(dot)org>
To: <pgsql-general(at)postgresql(dot)org>
Subject: sorting library of congress numbers
Date: 2005-01-19 22:37:20
Message-ID: 010f01c4fe77$70306680$0200a8c0@dell8200
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stuart Bishop 2005-01-19 22:50:43 Re: Multiline plpython procedure
Previous Message Eric E 2005-01-19 22:15:59 PL/TCL functions won't run