Wiki
Home

PostgreSQL

- [SQL](sql.md)
- <http://www.postgresguide.com/>
- <http://use-the-index-luke.com/de>
- <http://www.postgresql.org/docs/9.4/interactive/index.html>
- <https://www.pgcasts.com/episodes/1/generating-json-from-sql/>
- <https://pgexercises.com/>
- <http://rachbelaid.com/postgres-full-text-search-is-good-enough/>
- [Blogpost about PostgREST](https://blog.frankel.ch/poor-man-api/)

First Steps

- <https://wiki.postgresql.org/wiki/First_steps>
- Create role:
  
  ```bash
  su postgres
  createuser --interactive
  ```
  Connect to Database:
  
  ```bash
  su - postgres
  psql
  CREATE USER xxx PASSWORD 'yyy';
  \connect dbname;
  SELECT * FROM tablename;
  ```
- ## Login Stuff
  
  `psql -U youruser -h localhost -d yourdb`

Enable External Login

Python

- <http://initd.org/psycopg/docs/usage.html>
- <https://wiki.postgresql.org/wiki/Psycopg2_Tutorial>