LoginSignup
0
0

More than 5 years have passed since last update.

PostgreSQL note

Posted at

with docker

Connection via tcp

create users

via postgres user. mydb's owner will be postgres.

sudo -u postgres psql
create database mydb;
create user myuser with encrypted password 'mypass';
grant all privileges on database mydb to myuser;

Create new db & new owner

CREATE DATABASE dbname OWNER rolename;

db's timezone

ALTER DATABASE exsampledb SET timezone TO 'Asia/Tokyo';
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0