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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "liveloveprosper(at)gmail(dot)com" <liveloveprosper(at)gmail(dot)com>
Cc: "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:01:38
Message-ID: CAKFQuwZaS_De6bn6g9+boJJ6h1xX=LJ1Mr1mMp=rhb4VqVoaaQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Saturday, June 18, 2016, <liveloveprosper(at)gmail(dot)com> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 14200
> Logged by: Matthew Di Pasquale
> Email address: liveloveprosper(at)gmail(dot)com <javascript:;>
> PostgreSQL version: 9.5.3
> Operating system: OS X 10.11.5
> Description:
>
> Problem:
> http://stackoverflow.com/q/22256124

Not a bug.

And it was asked and answered, correctly, two years ago.

> Why doesn't the user table have the pg_ prefix or some other prefix?

You should read that SO post again...

It does. Check the docs for proof. Or just try <select * from user> in
newly created database. Then try <select * from pg_user>.

> 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. But as the SO answer advises just live with the
fact it's not a recommended approach.

>
> Would the only reason to use table name prefixes be to avoid this
> conflict?
>
> http://stackoverflow.com/questions/324163/should-we-use-prefixes-in-our-database-table-naming-conventions#comment61629636_324183
>
>
Don't know what you are asking for here...

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2016-06-19 04:53:27 Re: BUG #14200: Cannot create a table named 'user'
Previous Message liveloveprosper 2016-06-19 02:58:54 BUG #14200: Cannot create a table named 'user'