Check out example codes for "postgresql list db". It will help you in understanding the concepts better.

Code Example 1

postgres=# \l

Code Example 2

List all databases:
\l

Learn ReactJs, React Native from akashmittal.com