Skip to content

Instantly share code, notes, and snippets.

@clhenrick
clhenrick / README.md
Last active March 3, 2025 23:02
PostgreSQL & PostGIS cheatsheet (a work in progress)
@Kartones
Kartones / postgres-cheatsheet.md
Last active March 14, 2025 09:32
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@kidpixo
kidpixo / PostGIS 2.0 Cheatsheet.md
Last active October 11, 2024 11:14
PostGIS 2.0 Cheatsheet
@nicholsn
nicholsn / .bash_color
Created May 17, 2013 06:02
awesome bash color file for mac that shows a git repo status ... in color :-)
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset