Re: [HACKERS] Is "isolation" a restricted word? - Mailing list pgsql-hackers

From Ross J. Reedstrom
Subject Re: [HACKERS] Is "isolation" a restricted word?
Date
Msg-id 19990913164626.A32509@wallace.ece.rice.edu
Whole thread Raw
In response to Is "isolation" a restricted word?  ("G. Anthony Reina" <reina@nsi.edu>)
List pgsql-hackers
On Mon, Sep 13, 1999 at 02:36:48PM -0700, G. Anthony Reina wrote:
> I am trying to make a table with a class called "isolation". For some
> reason, I am getting a parser error:
> 
> => create table cell ( isolation text );
> ERROR:  parser: parse error at or near "isolation"
> 
> If I just take off the "n", I get:
> 
> => create table cell ( isolatio text );
> CREATE
> 
> This table had no problems previously; has the word isolation been used
> somewhere else as a SQL word? I can't think of why else I am having
> problems with the table (the syntax appears to be correct).

Yup - here it is in pgsql/src/backend/parser/keywords.c:

...       {"is", IS},       {"isnull", ISNULL},       {"isolation", ISOLATION},       {"join", JOIN},       {"key",
KEY},      {"lancompiler", LANCOMPILER},
 
...

This table should in fact be the definitive guide, since it's the array
that the parser uses ;-)

And it's mentioned in the HISTORY file as part of the MVCC
changes. They're a couple of these 'gotcha' words that are part of
the SQL standard, but hadn't yet been implemented before 6.5 that have
triped up people.

If you have to keep the table name, quote it:

create table cell ( "isolation" text );

But then you'll always have to quote it. I'm stuck with a bunch of
MiXedCaSE tables  that I have to do that with.

Ross

-- 
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> 
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005


pgsql-hackers by date:

Previous
From: "G. Anthony Reina"
Date:
Subject: Is "isolation" a restricted word?
Next
From: "G. Anthony Reina"
Date:
Subject: Re: [HACKERS] Is "isolation" a restricted word?