Error with word 'desc' - Mailing list pgsql-general

From Reuben D. Budiardja
Subject Error with word 'desc'
Date
Msg-id 200306241058.04565.techlist@voyager.phys.utk.edu
Whole thread Raw
Responses Re: Error with word 'desc'  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List 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 by date:

Previous
From: Network Administrator
Date:
Subject: Fwd: Re: Lotus Domino and PostgreSql in Linux
Next
From: Tom Lane
Date:
Subject: Re: Many Pl/PgSQL parameters -> AllocSetAlloc(128)?