From: | Yoshihiko Ichikawa <ichikawa(at)is(dot)ocha(dot)ac(dot)jp> |
---|---|
To: | christiangda(at)cantv(dot)net |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: Query Problem!! |
Date: | 2001-01-15 00:30:57 |
Message-ID: | 20010115093057J.ichikawa@is.ocha.ac.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Mon, 8 Jan 2001 15:50:42 -0400, <christiangda(at)cantv(dot)net> wrote:
> I have PostgreSQL v7.02 in RedHat 6.2;
>
> I have problem with is Query:
> select name, 'user' as class from smuser union select name, 'group' as class from smgroup order by class;
>
> sentence problem is:{ order by class} !!!!
>
> thank you,
> Christian Gonzalez
Hi. This is because ``class'' is one of the reserved keywords of
PostgreSQL. You can avoid this problem by using quoted identifiers
like
select name, 'user' as "class" from smuser ...,
or simply rename the attribute.
-----
Yoshihiko Ichikawa
Department of Information Sciences, Ochanomizu University
Phone: +81-3-5978-5708; Fax: +81-3-5978-5705
E-mail: ichikawa(at)is(dot)ocha(dot)ac(dot)jp
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-01-15 00:40:39 | Re: Query Problem!! |
Previous Message | Michael Richards | 2001-01-14 21:52:46 | Problems Compiling on a R3000 MIPS |