DBA Hub

📋Steps in this guide1/1

Create a database in postgres

-- Below commands can be used to create database

postgresql configurationintermediate
by PostgreSQL
14 views
1

Create a database in postgres

-- Below commands can be used to create database

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
postgres=#
create database DBATEST;
CREATE DATABASE
postgres=#
create database DBATEST with tablespace ts_postgres;
CREATE DATABASE
postgres#
CREATE DATABASE "DBATEST"
WITH TABLESPACE ts_postgres
OWNER "postgres"
ENCODING 'UTF8'
LC_COLLATE = 'en_US.UTF-8'
LC_CTYPE = 'en_US.UTF-8'
TEMPLATE template0;
-- View database information:
postgres=#
\l
postgres#
select * from pg_database;
<< Note - alternatively database can be created using pgadmin GUI tool also >>>

Comments (0)

Please to add comments

No comments yet. Be the first to comment!