Re: Query Problem!!

Поиск
Список
Период
Сортировка
От Yoshihiko Ichikawa
Тема Re: Query Problem!!
Дата
Msg-id 20010115093057J.ichikawa@is.ocha.ac.jp
обсуждение исходный текст
Ответ на Query Problem!!  (<christiangda@cantv.net>)
Список pgsql-bugs
On Mon, 8 Jan 2001 15:50:42 -0400, <christiangda@cantv.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@is.ocha.ac.jp

В списке pgsql-bugs по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Query Problem!!
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Query Problem!!