Re: Trying to create DB / user to import some data

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Trying to create DB / user to import some data
Date: 2013-09-27 18:16:33
Message-ID: 5245CB81.6030401@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9/26/2013 10:28 PM, mdr wrote:
> create user import_dbms_user with password 'import_dbms';
> create database import_dbms_db;
> grant all privileges on database import_dbms_db to import_dbms_user;

that grant only controls connection and create schema privileges. if you
want this user to have full control of this database, you should instead
have made them the owner, like...

alter database import_dbms_db owner import_dbms_user;

(or simply adding 'owner import_dbms_user' to the create database command)

re: pg_hba.conf, I don't micromanage access in there for most of my
systems, rather, I leave it set something like...

local all postgres peer
local all all md5
host all all 127.0.0.0/8 md5
host all all 10.x.y.0/20 md5 # thats my LAN subnet, I'm not
expecting any connections from outside

--
john r pierce 37N 122W
somewhere on the middle of the left coast

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message mdr 2013-09-27 18:27:29 Creating Primary Key after CREATE TABLE: Is Sequence created?
Previous Message mdr 2013-09-27 18:05:23 Re: Trying to create DB / user to import some data