Re: weird problem with PG 8.1

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Marcin Krol <mrkafk(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: weird problem with PG 8.1
Date: 2009-03-31 15:48:42
Message-ID: dcc563d10903310848x1262f0c0w3792f59a5cf5c872@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Mar 31, 2009 at 9:35 AM, Marcin Krol <mrkafk(at)gmail(dot)com> wrote:
> Hello everyone,
>
> I'm having this completely weird problem that ORDER BY doesn't seem to work
> correctly in PG 8.1 as bundled in RedHat 5.
>
> When I issue:
>
> SELECT * FROM virtualization;
>
> I get all the fields:
>
> reservations=# SELECT * FROM virtualization;
>  id | Virtualization  |  color
> ----+-----------------+---------
>  1 | BOX             | #FAFAFA
>  2 | LPAR            | #999999
>  3 | BOX ZONE HOST   | #FAFAFA
>  4 | NPAR            | #9966CC
>  5 | VPAR            | #9966CC
>
> But when I try to order by column Virtualization:
>
> reservations=# SELECT * FROM virtualization ORDER BY Virtualization;
>
> ERROR:  could not identify an ordering operator for type virtualization
> HINT:  Use an explicit ordering operator or modify the query.

Since you named it "Virtualization" you now get to quote it whenever
you reference it. Virtualization, without quotes, case folds to
virtualization, which doesn't exist. "Virtualization" will allow you
to reference it.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-03-31 15:49:30 Re: Space for pg_dump
Previous Message Guillaume Lelarge 2009-03-31 15:47:10 Re: weird problem with PG 8.1