File tree 2 files changed +19
-1
lines changed
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ variety of languages and technologies. These are things that don't really
7
7
warrant a full blog post. These are mostly things I learn by pairing with
8
8
smart people at [ Hashrocket] ( http://hashrocket.com/ ) .
9
9
10
- _ 378 TILs and counting..._
10
+ _ 379 TILs and counting..._
11
11
12
12
---
13
13
@@ -163,6 +163,7 @@ _378 TILs and counting..._
163
163
- [ Aggregate A Column Into An Array] ( postgres/aggregate-a-column-into-an-array.md )
164
164
- [ Auto Expanded Display] ( postgres/auto-expanded-display.md )
165
165
- [ Checking The Type Of A Value] ( postgres/checking-the-type-of-a-value.md )
166
+ - [ Clear The Screen In psql] ( postgres/clear-the-screen-in-psql.md )
166
167
- [ Compute Hashes With pgcrypto] ( postgres/compute-hashes-with-pgcrypto.md )
167
168
- [ Configure The Timezone] ( postgres/configure-the-timezone.md )
168
169
- [ Constructing A Range Of Dates] ( postgres/constructing-a-range-of-dates.md )
Original file line number Diff line number Diff line change
1
+ # Clear The Screen In psql
2
+
3
+ The ` psql ` interactive terminal does not have a built-in way of clearing the
4
+ screen. What I usually do if I really need the screen cleared is quit, run
5
+ ` clear ` from the shell, and then open a new ` psql ` session. This is
6
+ unnecessary though. Instead, we can use the ` \! ` command to execute a shell
7
+ command, in this case, the ` clear ` command.
8
+
9
+ ```
10
+ > \! clear
11
+ ```
12
+
13
+ This clears the screen in one step and keeps our current session running.
14
+
15
+ See the [ psql
16
+ docs] ( http://www.postgresql.org/docs/current/static/app-psql.html ) for more
17
+ details.
You can’t perform that action at this time.
0 commit comments