Re: BUG #14200: Cannot create a table named 'user'

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #14200: Cannot create a table named 'user'
Дата
Msg-id 25300.1466312007@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #14200: Cannot create a table named 'user'  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Saturday, June 18, 2016, <liveloveprosper@gmail.com> wrote:
>> What if I want to create a user table for my application? Shouldn't I be
>> able to call that table user?

> If you quote it you can.

Worth noting here is that USER is a reserved word according to the
SQL standard, as well as our documentation:
https://www.postgresql.org/docs/9.5/static/sql-keywords-appendix.html

You should not be surprised that you can't use it as a generic identifier
without adding quotes.

(The only reason it's reserved in Postgres is to implement the
spec-defined meaning of the keyword.  I can't imagine that we'd have
chosen to reserve it without that requirement.)

            regards, tom lane

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #14200: Cannot create a table named 'user'
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #14199: The pg_ctl status check on server start is not compatible with the silent_mode=on