dbTalk Databases Forums  

[BUGS] Erro

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] Erro in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Aldrey Galindo
 
Posts: n/a

Default [BUGS] Erro - 05-03-2004 , 11:46 PM






Hi,
Would like to report a problem that happened with a
friend mine. I was to inquire and I found the
following one.

--
db=# create table teste (desc varchar(50));
ERROR: parser: parse error at or near "desc" at
character 21
db=# create table desc (teste varchar(50));
ERROR: parser: parse error at or near "desc" at
character 14
db=# create table table (teste varchar(50));
ERROR: parser: parse error at or near "table" at
character 14
db=# create table teste (table varchar(50));
ERROR: parser: parse error at or near "table" at
character 21
--

Aldrey


__________________________________________________ ____________________

Yahoo! Messenger - Fale com seus amigos online. Instale agora!
http://br.download.yahoo.com/messenger/

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Erro - 05-04-2004 , 12:45 AM






=?iso-8859-1?q?Aldrey=20Galindo?= <aldreygalindo (AT) yahoo (DOT) com.br> writes:
Quote:
db=# create table teste (desc varchar(50));
ERROR: parser: parse error at or near "desc" at
character 21
DESC is a reserved keyword, per the SQL specification.

If you really really want to name your column or table "desc", you can
double-quote the word. But I'd suggest picking another name.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match


Reply With Quote
  #3  
Old   
Stephan Szabo
 
Posts: n/a

Default Re: [BUGS] Erro - 05-04-2004 , 12:48 AM



On Wed, 28 Apr 2004, [iso-8859-1] Aldrey Galindo wrote:

Quote:
Hi,
Would like to report a problem that happened with a
friend mine. I was to inquire and I found the
following one.

--
db=# create table teste (desc varchar(50));
ERROR: parser: parse error at or near "desc" at
character 21
db=# create table table (teste varchar(50));
ERROR: parser: parse error at or near "table" at
character 14
DESC and TABLE are reserved words in SQL, so you need to double
quote them to use them as column or table names.


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.