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

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #14200: Cannot create a table named 'user'
Дата
Msg-id CAKFQuwZaS_De6bn6g9+boJJ6h1xX=LJ1Mr1mMp=rhb4VqVoaaQ@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #14200: Cannot create a table named 'user'  (liveloveprosper@gmail.com)
Ответы Re: BUG #14200: Cannot create a table named 'user'  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Saturday, June 18, 2016, <liveloveprosper@gmail.com> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      14200
> Logged by:          Matthew Di Pasquale
> Email address:      liveloveprosper@gmail.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.

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

Предыдущее
От: liveloveprosper@gmail.com
Дата:
Сообщение: BUG #14200: Cannot create a table named 'user'
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #14200: Cannot create a table named 'user'