Need Assistance?

support@tutorialshub.in

Getting Started with PostgreSQL

Essential psql CLI Commands

ADVERTISEMENT
PostgreSQL Free Lesson
5 min read
ADVERTISEMENT

While pgAdmin is great visually, knowing a handful of psql backslash commands makes you 10x faster on servers:

  • \l — List all databases
  • \c dbname — Connect/switch to a database
  • \dt — List all tables in the current schema
  • \d tablename — Describe table columns, types, and indexes
  • \x — Toggle expanded vertical display (great for wide rows)
  • \q — Quit psql
ADVERTISEMENT
Hi, I'm Tuby! Here to help you