Error with word 'desc'

From: "Reuben D(dot) Budiardja" <techlist(at)voyager(dot)phys(dot)utk(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Error with word 'desc'
Date: 2003-06-24 14:58:04
Message-ID: 200306241058.04565.techlist@voyager.phys.utk.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.
-------------------------------------------------

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-06-24 15:01:56 Re: [GENERAL] Documentation quality WAS: interesting
Previous Message Tim Hawkins 2003-06-24 14:54:47 Re: [GENERAL] Documentation quality WAS: interesting