Skip to content

Instantly share code, notes, and snippets.

View syafiqrokman-coinhako's full-sized avatar

Syafiq Rokman syafiqrokman-coinhako

View GitHub Profile

PostgreSQL Cheat Sheet

My personal Cheatsheet for PostgreSQL

Quick Commands

Creating a DB and Setting its Ownership

To create a database, you need to first ensure that the database's role exists first. Role and User are synonymous in PostgreSQL. Once you create the ROLE, you can create the Database and set the OWNER as the ROLE.