Projekat

Općenito

Profil

psql

1) Logiranje sa psql na bring_test bazu

hernad@macan:~/github/F18_knowhow$ psql -h localhost -p 5432 -U admin -W bring_test

Password for user admin: 
psql (9.1.0)
Type "help" for help.

\dt fmk.k*;

output:

         List of relations
 Schema |   Name    | Type  | Owner 
--------+-----------+-------+-------
 fmk    | kalk_doks | table | admin
 fmk    | kalk_kalk | table | admin
 fmk    | kbenef    | table | admin
 fmk    | koncij    | table | admin
 fmk    | konto     | table | admin
 fmk    | kred      | table | admin
(6 rows)

2) login na master database postgres

psql  -h localhost -p 5432 -U admin -W postgres

create database bring_test

moramo biti logirani na postgres bazu za ovu operaciju:

postgres=# create database bring_test_2 owner xtrole;

output:

CREATE DATABASE

3) drop database bring_test

moramo biti logirani na postgres bazu za ovu operaciju:

postgres=# drop database bring_test;

output:

DROP DATABASE

R) Reference

  • #24471