File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 11# 🖥️ Using psql
22
3- ` psql ` is the command-line tool for interacting with your PostgreSQL
4- database. SuperStack makes it easy to run psql inside the container using a
5- helper script.
3+ ` psql ` is the command-line tool for interacting with your PostgreSQL database.
4+ SuperStack makes it easy to run psql inside the container using a helper
5+ script.
66
77## 📟 Open a psql Shell
88
99To connect interactively:
1010
1111``` sh
12- bin/postgres psql
12+ bin/postgres
1313```
1414
1515Example output:
@@ -21,14 +21,20 @@ Type "help" for help.
2121app=#
2222```
2323
24+ > 🗒️ ** By default, ` bin/postgres ` opens a ` psql ` shell.** You can still run
25+ > other commands (e.g., bin/postgres bash) if needed.
26+
2427## 🔹 Run Inline SQL Commands
2528
26- You can also run SQL directly from the command line :
29+ You can also run SQL directly without opening an interactive shell :
2730
2831```
29- bin/postgres psql -c 'select * from movie;'
32+ bin/postgres -c 'select * from movie;'
3033```
3134
35+ ✅ Because ` bin/postgres ` defaults to ` psql ` , you don’t need to type ` psql `
36+ explicitly.
37+
3238## ⚙️ Customize psql Behavior
3339
3440You can persist your preferences using ` .psqlrc ` and ` .inputrc ` .
You can’t perform that action at this time.
0 commit comments