Re: PostgreSQL v9.4, ERROR: must be owner of database test_db

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: PostgreSQL v9.4, ERROR: must be owner of database test_db
Дата
Msg-id CAKFQuwZ8Pwo0k2xZ8S_XUHMB8UGJwT+Vv2VOzUptZ_qTk0Jf9A@mail.gmail.com
обсуждение исходный текст
Ответ на PostgreSQL v9.4, ERROR: must be owner of database test_db  (KARIN SUSANNE HILBERT <ioh1@psu.edu>)
Ответы Re: PostgreSQL v9.4, ERROR: must be owner of database test_db  (KARIN SUSANNE HILBERT <ioh1@psu.edu>)
Список pgsql-novice
On Wed, Jul 20, 2016 at 3:37 PM, KARIN SUSANNE HILBERT <ioh1@psu.edu> wrote:

2016-07-10 02:54:12 EDT [4415]: [5-1] db=test_db,user=test_user LOG: statement: alter database test_db set standard_conforming_strings='off';

2016-07-10 02:54:12 EDT [4415]: [6-1] db=test_db,user=test_user ERROR: must be owner of database test_db


T
​he reason this isn't a problem is that the ALTER DATABASE is executed in its own transaction so when it fails it doesn't impact any other (future) activity in the session.

​The short answer is to tell the developer to stop sending "ALTER DATABASE SET" statements as part of their connection startup routine.

If you want to spend the time to understand why the documentation is a very good reference.


This isn't anything special about the choice of "standard_conforming_strings" here, though search_path is probably a more frequent used choice.


​I also noticed this:

​alter database :dbname set search_path=:dbuser;

On its face that just feels wrong, though there is nothing technically incorrect about it.  Personally I would name the application, and the schemas for the application, different than the name of the user that is going to be accessing those schemas.  To have the name of a schema and the name of a user match, when said schema is not a personal schema for the user, is unusual.

David J.

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

Предыдущее
От: KARIN SUSANNE HILBERT
Дата:
Сообщение: PostgreSQL v9.4, ERROR: must be owner of database test_db
Следующее
От: KARIN SUSANNE HILBERT
Дата:
Сообщение: Re: PostgreSQL v9.4, ERROR: must be owner of database test_db