Error with word 'desc'

Поиск
Список
Период
Сортировка
От Reuben D. Budiardja
Тема Error with word 'desc'
Дата
Msg-id 200306241058.04565.techlist@voyager.phys.utk.edu
обсуждение исходный текст
Ответы Re: Error with word 'desc'  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
Hi,
Seems that everytime I use the word 'desc' I got an error. For example, this
query:
SELECT code, desc FROM or_code_table WHERE tr = 'FORMAT'
gave me
ERROR:  parser: parse error at or near "desc"

When I created the table I got the same error too. I got around that by
creating the table using pgaccess instead of using psql console.

Is 'desc' a reserved key word of some kind ? Even if yes (like in mysql or
oracle), the parser should understand the context in which it's mentioned. I
don't remember I got that kind of error with mysql / oracle.

Here is the table:

lightcone=# \d or_code_table;
                Table "or_code_table"
  Column  |           Type           |   Modifiers
----------+--------------------------+---------------
 code     | character varying(2)     | not null
 tr       | character varying(10)    | not null
 desc     | character varying(100)   |
 mod_user | character varying(15)    |
 mod_time | timestamp with time zone | default now()
Primary key: or_code_table_pkey


Any help is greatly appreciated.

Thanks.

RDB

--
Reuben D. Budiardja
Department of Physics and Astronomy
The University of Tennessee, Knoxville, TN
-------------------------------------------------
/"\  ASCII Ribbon Campaign against HTML
\ /  email and proprietary format
 X   attachments.
/ \
-------------------------------------------------
Have you been used by Microsoft today?
Choose your life. Choose freedom.
Choose LINUX.
-------------------------------------------------


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

Предыдущее
От: Network Administrator
Дата:
Сообщение: Fwd: Re: Lotus Domino and PostgreSql in Linux
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Many Pl/PgSQL parameters -> AllocSetAlloc(128)?