pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: liveloveprosper@gmail.com <liveloveprosper@gmail.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14200: Cannot create a table named 'user'
Date: Sun, 19 Jun 2016 00:53:27 -0400
Message-ID: <25300.1466312007@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwZaS_De6bn6g9+boJJ6h1xX=LJ1Mr1mMp=rhb4VqVoaaQ@mail.gmail.com>
References: <20160619025854.5798.82044@wrigleys.postgresql.org>
	<CAKFQuwZaS_De6bn6g9+boJJ6h1xX=LJ1Mr1mMp=rhb4VqVoaaQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (3+ messages)

Message-ID: <25300.1466312007@sss.pgh.pa.us>
Permalink:  ../25300.1466312007@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25300.1466312007@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, liveloveprosper@gmail.com
  Subject: Re: BUG #14200: Cannot create a table named 'user'
  In-Reply-To: <25300.1466312007@sss.pgh.pa.us>
  References: <20160619025854.5798.82044@wrigleys.postgresql.org> <CAKFQuwZaS_De6bn6g9+boJJ6h1xX=LJ1Mr1mMp=rhb4VqVoaaQ@mail.gmail.com> <25300.1466312007@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox