🌐
GitHub
gist.github.com › Kartones › dd3ff5ec5ea238d4c546
PostgreSQL command line cheatsheet · GitHub
A Performance Cheat Sheet for PostgreSQL: Great explanations of EXPLAIN, EXPLAIN ANALYZE, VACUUM, configuration parameters and more. Quite interesting if you need to tune-up a postgres setup. annotated.conf: Annotations of all 269 postgresql.conf settings for PostgreSQL 10. psql -c "\l+" -H -q postgres > out.html: Generate a html report of your databases (source: Daniel Westermann)
🌐
QuickRef.ME
quickref.me › home › postgresql cheat sheet & quick reference
PostgreSQL Cheat Sheet & Quick Reference
The PostgreSQL cheat sheet provides you with the common PostgreSQL commands and statements. Switch and connect · $ sudo -u postgres psql · List all databases · postgres=# \l · Connect to the database named postgres · postgres=# \c postgres ...
Discussions

Psql command line tutorial and cheat sheet
Even as someone already comfortable with psql, pgcli is extremely handy · SELECT * FROM parent JOIN child USING (user_id) I personally think naming your primary keys with their full name instead of calling all of them `id` or `key` is better practice also More on news.ycombinator.com
🌐 news.ycombinator.com
44
328
November 17, 2020
postgresql - How to use the psql command to list, create, use and examine databases? - Stack Overflow
I'm a postgreSQL newbie and I can't find any usable introduction to using the psql command. At least I think that's the command I want to use. Is it possible in postgreSQL to simply connect to the More on stackoverflow.com
🌐 stackoverflow.com
Please beat up my psql tutorial/cheat sheet
"Quitting pqsql" -> "Quitting psql" "A database is a group of tables," -- would it be more clear to say that a database is a set of tables? The word "group" seems a bit vague. More on reddit.com
🌐 r/PostgreSQL
19
32
February 22, 2019
PostgreSQL to SQL server "cheat sheet"
W3schools shows a lot of functions and syntax for Tsql or transact sql. But really it’s pretty similar. More on reddit.com
🌐 r/SQL
4
1
November 22, 2023
🌐
TigerData
tigerdata.com › learn › postgres-cheat-sheet
Postgres Cheat Sheet | Tiger Data
August 26, 2025 - show config_file; config_file ------------------------------------------ /etc/postgresql/9.6/main/postgresql.conf (1 row) Copy// Show PostgreSQL configuration file location (psql) The PostgreSQL configuration files are stored in directory from above command output.
🌐
GeeksforGeeks
geeksforgeeks.org › postgresql › postgresql-cheat-sheet
PostgreSQL - Cheat Sheet : Basic to Advanced - GeeksforGeeks
July 23, 2025 - In this PostgreSQL Cheat Sheet, we've compiled the most essential commands, tips, and tricks for navigating PostgreSQL efficiently. From basic queries to advanced configurations, this article will be our go-to resource for effectively managing databases.
🌐
LearnSQL.com
learnsql.com › blog › postgresql-cheat-sheet
PostgreSQL Cheat Sheet | LearnSQL.com
February 14, 2024 - This PostgreSQL Cheat Sheet summarizes the key PostgreSQL commands and features you'll use often. It covers everything from how to connect to a PostgreSQL server and manage database contents, to the basic syntax for table creation and modification.
🌐
PostgreSQL Wiki
wiki.postgresql.org › wiki › Operations_cheat_sheet
Operations cheat sheet - PostgreSQL wiki
December 28, 2024 - psql runs "SHOW password_encryption" to determine the password hash scheme (MD5 or SCRAM), hashes the supplied password, and then issues an ALTER command.
🌐
PostgreSQL
tomcam.github.io › postgres
psql command line tutorial and cheat sheet | postgres
This worked to connect to Postgres on DigitalOcean # -U is the username (it will appear in the \l command) # -h is the name of the machine where the server is running. # -p is the port where the database listens to connections. Default is 5432. # -d is the name of the database to connect to. I think DO generated this for me, or maybe PostgreSQL. # Password when asked is csizllepewdypieiib $ psql -U doadmin -h production-sfo-test1-do-user-4866002-0.db.ondigitalocean.com -p 25060 -d mydb # Open a database in a remote location.
Find elsewhere
🌐
Hacker News
news.ycombinator.com › item
Psql command line tutorial and cheat sheet | Hacker News
November 17, 2020 - Even as someone already comfortable with psql, pgcli is extremely handy · SELECT * FROM parent JOIN child USING (user_id) I personally think naming your primary keys with their full name instead of calling all of them `id` or `key` is better practice also
🌐
Neon
neon.com › postgresql › postgresql-cheat-sheet
PostgreSQL Cheat Sheet - Download the Cheat Sheet in PDF Format
You can download and print it out for a quick reference to the most commonly used statements in PostgreSQL: Download the PostgreSQL Cheat Sheet · Access the PostgreSQL server from psql with a specific user: psql -U [username]; For example, ...
🌐
Neon
neon.com › postgresql › administration › show-databases
PostgreSQL Show Databases
To display more information on databases, you can use the \l+ command: ... The query returns four databases in the current PostgreSQL server. Use \l or \l+ in psql to show all databases in a PostgreSQL database server.
🌐
Medium
onlyoneaman.medium.com › postgres-cheatsheet-8e6a457c67cb
Postgres CheatSheet. Useful Postgres Commands | by Aman Kumar | Medium
February 3, 2023 - Cheatsheet containing Postgres Commands you need, Missing Anything? Kindly add a response or comment will add that 😄. The following command connects to a database under a specific user. After pressing Enter PostgreSQL will ask for the password of the user. psql -d database -U user -W ·
🌐
Cheatography
cheatography.com › tag › postgresql
13 Postgresql Cheat Sheets - Cheatography.com: Cheat Sheets For Every Occasion
PostgreSQL interactive terminal commands Cheat Sheet · Frequently used commands with PostgreSQL · squixy · 15 Jun 15, updated 12 May 16 · postgres, postgresql, psql · 2 Pages · (1) PostgreSQL Configuration Cheat Sheet · PostgreSQL configuration options and sensible defaults ·
🌐
PostgreSQL Tutorial
postgresqltutorial.com › wp-content › uploads › 2018 › 03 › PostgreSQL-Cheat-Sheet.pdf pdf
PostgreSQL CHEAT SHEET http://www.postgresqltutorial. ...
SELECT c1, c2 · FROM t1 · INNER JOIN t2 ON condition; · Inner join t1 and t2 · LEFT JOIN t2 ON condition; · Left join t1 and t1
🌐
Cheat Sheets
cheat-sheets.org › saved-copy › postgresql-cheat-sheet.pdf pdf
PostgreSQL Data Types
All cheat sheets, round-ups, quick reference cards, quick reference guides and quick reference sheets in one page.
🌐
Databaselabs
databaselabs.io › blog › img › Postgres-Cheat-Sheet.pdf pdf
Postgres Cheat Sheet PDF
PostgreSQL Cheat Sheet · Queries · psql · Joins · Transactions · psql -h hostname -U username db-name · \d -- list tables, views, seqs · \c other-db -- connect to another db · -- Send query results to a file: \copy (SELECT 2+2) TO '/tmp/outfile' -- Read commands from a file: \i ...
🌐
LearnSQL.com
learnsql.com › blog › postgresql-cheat-sheet › postgresql-cheat-sheet-a4.pdf pdf
PostgreSQL Cheat Sheet
PostgreSQL Cheat Sheet · PostgreSQL is an open-source relational database management
🌐
DataCamp
datacamp.com › cheat-sheet › postgre-sql-basics-cheat-sheet
PostgreSQL Basics Cheat Sheet | DataCamp
October 20, 2023 - With this PostgreSQL cheat sheet, you'll have a handy reference guide to basic querying tables, filtering data, and aggregating data