I just get my mind crossed here:

I do a simple select with order on a text-type. In my opinion entries with leading spaces should be either first (or maybe last) in the list.
But in my select the whitespace just seems to be ignored:

Note that the second row has a leading space and should imho be first entry.


# select traeger from wb_traeger where id>24 order by traeger;
                 traeger
-----------------------------------------
 GliA - gehirn | lern | impuls | agentur
  Sonstige Träger
 Volkshochschule Floridsdorf
 Zukunftszentrum Tirol
(4 rows)


note that this not only applies to leading spaces:


# select 'x'||traeger from wb_traeger where id>24 order by 'x'||traeger;
                 ?column?
------------------------------------------
 xGliA - gehirn | lern | impuls | agentur
 x Sonstige Träger
 xVolkshochschule Floridsdorf
 xZukunftszentrum Tirol
(4 rows)



the type of my column is simple text:


# \d wb_akademie
                                   Table "public.wb_akademie"
Column | Type | Modifiers
-------------+-----------------------------+----------------------------------------------------
<skip>
 traeger     | text                        |
<skip>



Is there any way to order so that entries with leading spaces are listed first??

thnx,
peter




---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to