PostgreSQL

%toc

First Steps

Login:

su - postgres
psql
CREATE USER xxx PASSWORD 'yyy';
\connect dbname;
SELECT * FROM tablename;

Login Stuff

psql -U youruser -h localhost -d yourdb

Important Commands

Help:

\?

List all Databases:

\l

\quit Quit pqsql

Create a database

CREATE DATABASE testdb;

Python