I've committed the fix to group.tcl, you might want to get a copy and
make sure I didn't screw anything up, though I did test it under PG 7.0.
As far as your other question goes, the query we've been speaking of
demonstrates how to get around your problem:
select the_column, upper(the_column) as upper_the_column
from the_table
order by upper_the_column
In other words, return the column twice, once in upper case for
ordering purposes, and once in its stored form to be used when your
script prints out the column's value.