<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/postgresql-meta-commands-that-save-time-every-day-5uwlrnk7e" -->

---
title: PostgreSQL Meta Commands that save time every day
description: PostgreSQL meta commands are special psql instructions that don't follow SQL syntax but are essential for daily DBA work. Covering connection management (\c,...
canonical: https://daily.dev/posts/postgresql-meta-commands-that-save-time-every-day-5uwlrnk7e
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: PostgreSQL Meta Commands that save time every day | daily.dev
og:description: PostgreSQL meta commands are special psql instructions that don't follow SQL syntax but are essential for daily DBA work. Covering connection management (\c,...
og:url: https://daily.dev/posts/postgresql-meta-commands-that-save-time-every-day-5uwlrnk7e
og:image: https://api.daily.dev/og/posts/5uwLRNK7E.png
og:image:alt: PostgreSQL Meta Commands that save time every day
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# PostgreSQL Meta Commands that save time every day

**[Percona Blog](https://daily.dev/sources/percona)** · 5 min read · 2 upvotes · 0 comments

## Summary

PostgreSQL meta commands are special psql instructions that don't follow SQL syntax but are essential for daily DBA work. Covering connection management (\c, \l, \conninfo), object inspection (\d family: \dt, \di, \dn, \du, \dx, \df), output formatting (\x, \o), performance monitoring (\timing, \watch), scripting (\i, \gexec, \!), and built-in help (\?, \h). Also covers the .psqlrc startup file for persisting default settings like timing and custom prompts. The analogy used: SQL drives the car, meta commands are the dashboard providing visibility into the environment.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.percona.com/blog/postgresql-meta-commands-that-save-time-every-day>

## Questions this post answers

### How do I list all tables in a specific schema using psql?

Use the \dt meta command with a schema-qualified pattern, such as \dt public.* to list all tables in the public schema. Without a schema qualifier, \dt lists tables in the current search path. This same wildcard pattern matching also works with \di for indexes and \df for functions.

_Developers refining their PostgreSQL workflow can find more psql tips and database techniques on daily.dev._

### What does the .psqlrc file do in PostgreSQL's psql client?

.psqlrc is a startup file located in the home directory that psql reads automatically at the beginning of every session. It can contain meta-commands and SQL statements that run before the first prompt appears, letting a user set consistent defaults like timing, output formatting, and a custom prompt without repeating configuration on each connection.

_Anyone standardizing their database setup can browse workflow tips like this via daily.dev._

### What is the difference between SQL and psql meta commands in PostgreSQL?

SQL is used to retrieve, insert, update, and delete data stored in a PostgreSQL database, while meta commands (interpreted by psql itself, not PostgreSQL) are used to navigate, inspect, and control the database session, such as listing tables, roles, schemas, and extensions. SQL interacts with the data; meta commands provide visibility into the database environment, similar to a car's dashboard versus its driving controls.

_Database professionals comparing tools for daily administration can track PostgreSQL insights on daily.dev._

## Similar posts on daily.dev

- [Postgres Internals Hiding in Plain Sight](https://daily.dev/posts/postgres-internals-hiding-in-plain-sight-x4mkwtfi1) · Crunchy Data · 1 upvotes · 0 comments
- [Debug your Postgres from the terminal: a tour of \`neon inspect db\`](https://daily.dev/posts/debug-your-postgres-from-the-terminal-a-tour-of-neon-inspect-db--udxpnfh83) · Neon · 15 upvotes · 0 comments
- [Pipelining in psql \(PostgreSQL 18\)](https://daily.dev/posts/pipelining-in-psql-postgresql-18--a5rc3js92) · Hacker News · 9 upvotes · 0 comments
- [150\+ SQL Commands Explained With Examples \(2026 Update\)](https://daily.dev/posts/150-sql-commands-explained-with-examples-2026-update--64pgubwx0) · Planet MySQL · 2 upvotes · 0 comments

---

Tags: [#database](https://daily.dev/tags/database), [#sql](https://daily.dev/tags/sql), [#postgresql](https://daily.dev/tags/postgresql)

[View this post on daily.dev](https://daily.dev/posts/postgresql-meta-commands-that-save-time-every-day-5uwlrnk7e)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"PostgreSQL Meta Commands that save time every day","url":"https://daily.dev/posts/postgresql-meta-commands-that-save-time-every-day-5uwlrnk7e","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/postgresql-meta-commands-that-save-time-every-day-5uwlrnk7e"},"datePublished":"2026-07-15T13:57:46.536Z","dateModified":"2026-09-13T20:41:11.171Z","description":"PostgreSQL meta commands are special psql instructions that don't follow SQL syntax but are essential for daily DBA work. Covering connection management (\\c,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ff501f8aa2453974b59d8647f931591b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ff501f8aa2453974b59d8647f931591b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Percona Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Percona Blog","logo":"https://media.daily.dev/image/upload/s--Lb3XkBh3--/f_auto,q_auto/v1780213412/logos/percona?_a=BAMAMiWQ0","url":"https://daily.dev/sources/percona"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/postgresql-meta-commands-that-save-time-every-day-5uwlrnk7e","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"database,sql,postgresql","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Percona Blog","item":"https://daily.dev/sources/percona"},{"@type":"ListItem","position":3,"name":"PostgreSQL Meta Commands that save time every day"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/postgresql-meta-commands-that-save-time-every-day-5uwlrnk7e#faq","mainEntity":[{"@type":"Question","name":"How do I list all tables in a specific schema using psql?","acceptedAnswer":{"@type":"Answer","text":"Use the \\dt meta command with a schema-qualified pattern, such as \\dt public.* to list all tables in the public schema. Without a schema qualifier, \\dt lists tables in the current search path. This same wildcard pattern matching also works with \\di for indexes and \\df for functions. Developers refining their PostgreSQL workflow can find more psql tips and database techniques on daily.dev."}},{"@type":"Question","name":"What does the .psqlrc file do in PostgreSQL's psql client?","acceptedAnswer":{"@type":"Answer","text":".psqlrc is a startup file located in the home directory that psql reads automatically at the beginning of every session. It can contain meta-commands and SQL statements that run before the first prompt appears, letting a user set consistent defaults like timing, output formatting, and a custom prompt without repeating configuration on each connection. Anyone standardizing their database setup can browse workflow tips like this via daily.dev."}},{"@type":"Question","name":"What is the difference between SQL and psql meta commands in PostgreSQL?","acceptedAnswer":{"@type":"Answer","text":"SQL is used to retrieve, insert, update, and delete data stored in a PostgreSQL database, while meta commands (interpreted by psql itself, not PostgreSQL) are used to navigate, inspect, and control the database session, such as listing tables, roles, schemas, and extensions. SQL interacts with the data; meta commands provide visibility into the database environment, similar to a car's dashboard versus its driving controls. Database professionals comparing tools for daily administration can track PostgreSQL insights on daily.dev."}}]}
```

