From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | "liveloveprosper(at)gmail(dot)com" <liveloveprosper(at)gmail(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14200: Cannot create a table named 'user' |
Date: | 2016-06-19 04:53:27 |
Message-ID: | 25300.1466312007@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Saturday, June 18, 2016, <liveloveprosper(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2016-06-19 10:57:42 | Re: [BUGS] BUG #14199: The pg_ctl status check on server start is not compatible with the silent_mode=on |
Previous Message | David G. Johnston | 2016-06-19 04:01:38 | Re: BUG #14200: Cannot create a table named 'user' |