Re: [HACKERS] Is "isolation" a restricted word?

From: "Ross J(dot) Reedstrom" <reedstrm(at)wallace(dot)ece(dot)rice(dot)edu>
To: "G(dot) Anthony Reina" <reina(at)nsi(dot)edu>
Cc: "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Is "isolation" a restricted word?
Date: 1999-09-13 21:46:26
Message-ID: 19990913164626.A32509@wallace.ece.rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)rice(dot)edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message G. Anthony Reina 1999-09-13 22:03:02 Re: [HACKERS] Is "isolation" a restricted word?
Previous Message G. Anthony Reina 1999-09-13 21:36:48 Is "isolation" a restricted word?