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

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: [HACKERS] Is "isolation" a restricted word?
Дата
Msg-id 37DDB24B.6B1193E@alumni.caltech.edu
обсуждение исходный текст
Ответ на Is "isolation" a restricted word?  ("G. Anthony Reina" <reina@nsi.edu>)
Список pgsql-hackers
> > reason, I am getting a parser error:
> > => create table cell ( isolation text );
> > ERROR:  parser: parse error at or near "isolation"
> > 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:
> This table should in fact be the definitive guide, since it's the array
> that the parser uses ;-)

It is a definitive guide for keywords, but is a superset of keywords
which are allowed as column names. In this case, ISOLATION was added
to the syntax but was not added to gram.y as an allowed column id.
Edit src/backend/parser/gram.y, look for the line starting with
"ColId:", and add ISOLATION to the already long list of keywords which
follows.

I'll make the change for v6.6; it could perhaps be used for v6.5.3
also, if there is one.

> 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
> tripped up people.

Keep reporting them, because in some cases we can allow them even
though they may be a reserved word in SQL92. But that can lead to
portability problems, not that I can imagine anyone moving away from
Postgres ;)
                      - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: [HACKERS] Status report: long-query-string changes
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: [HACKERS] Is "isolation" a restricted word?