Check out example codes for "clear screen command in psql". It will help you in understanding the concepts better.

Code Example 1

If you are using Linux, type-in the following to clear the screen
<dbname>=# \! clear

Code Example 2

//for linux 
\! clear

// for window
\! cls

Learn ReactJs, React Native from akashmittal.com