{"slug": "psql", "name": "psql", "category": "terminal", "category_name": "Terminal and shell", "description": "", "recommenders": 3, "commenters": 6, "warners": 0, "score": 3.335, "rising": -0.98, "first": "2025-11-11", "latest": "2026-06-05", "why": "I find this to put my psql in a better place as a daily driver.", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 3, "neutral": 3, "compare": 0, "warn": 0}, "spark": [0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "I find this to put my psql in a better place as a daily driver.", "kind": "", "icon": true, "domain": null, "github_repo": null, "official_url": "https://www.postgresql.org/docs/current/app-psql.html", "pricing": "", "aliases": ["psql"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 774642640, "item_id": 48415165, "url": "https://news.ycombinator.com/item?id=48415165", "by": "adonese", "date": "2026-06-05", "version": null, "stance": "recommend", "quote": "I find this to put my psql in a better place as a daily driver.", "excerpt": "I find this to put my psql in a better place as a daily driver. Adding this to ~/.inputrc [1] will allow you to limit search on your entered text. Eg. select (up arrow) will loop through your psql history for commands that started with e.g., . The challenging part is in wide tables and or table with large data. Less is awkward usually so using pspg made it less awkward. I tried also to with help of ai, to write a plu", "context": "", "use_case": "daily PostgreSQL client", "switched_from": "", "story": "databow: a Rust CLI to query any database with an ADBC driver"}, {"id": 755359637, "item_id": 47209977, "url": "https://news.ycombinator.com/item?id=47209977", "by": "wenc", "date": "2026-03-01", "version": null, "stance": "recommend", "quote": "`psql` to probe Postgres databases.", "excerpt": "MCPs (especially remote MCPs) are like a black box API -- you don't have to install anything, provision any resources, etc. You just call it and get an answer. There's a place for that, but an MCP is ultimately a blunt instrument. CLI tools on the other hand are like precision instruments. Yes, you have to install them locally once, but after that, they have access to your local environment and can discover things on", "context": "ML work with agents", "use_case": "probing Postgres", "switched_from": "", "story": "MCP is dead. Long live the CLI"}, {"id": 741846544, "item_id": 46365409, "url": "https://news.ycombinator.com/item?id=46365409", "by": "gavinray", "date": "2025-12-23", "version": null, "stance": "recommend", "quote": "You can use \"psql\" to dump subsets of data from tables", "excerpt": "You can use \"psql\" to dump subsets of data from tables and then later import them. Something like: psql <db_url> -c \"\\copy (SELECT * FROM event_data ORDER BY created_at DESC LIMIT 100) TO 'event-data-sample.csv' WITH CSV HEADER\" https://www.postgresql.org/docs/current/sql-copy.html It'd be really nice if pg_dump had a \"data sample\"/\"data subset\" option but unfortunately nothing like that is built in that I know of.", "context": "", "use_case": "Dump table subsets", "switched_from": "", "story": "Instant database clones with PostgreSQL 18"}]}], "caveats": [], "who": [{"by": "wenc", "context": "ML work with agents", "url": "https://news.ycombinator.com/item?id=47209977", "date": "2026-03-01"}], "tags": [], "use_cases": ["daily postgresql client", "postgres command-line client", "probing postgres", "dump table subsets", "query analysis"], "compared": [{"slug": "postgresql", "name": "PostgreSQL", "co": 2, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=48377510", "title": "databow: a Rust CLI to query any database with an ADBC driver", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47454127", "title": "The way CTRL-C in Postgres CLI cancels queries is incredibly hack-y", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47208398", "title": "MCP is dead. Long live the CLI", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46363360", "title": "Instant database clones with PostgreSQL 18", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46336947", "title": "Go ahead, self-host Postgres", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=45889261", "title": "Select 1 Touches 5,583 Lines of Postgres Source Code", "mentions": 1}], "sentiment_by_month": {"2025-11": {"neutral": 1}, "2025-12": {"neutral": 1, "recommend": 1}, "2026-01": {}, "2026-02": {}, "2026-03": {"recommend": 1, "neutral": 1}, "2026-04": {}, "2026-05": {}, "2026-06": {"recommend": 1}, "2026-07": {}, "2026-08": {}, "2026-09": {}, "2026-10": {}}, "versions": [], "version_unnamed": 0, "family_ref": null, "runs_on": null, "lines": [], "quotes": [{"id": 774642640, "item_id": 48415165, "url": "https://news.ycombinator.com/item?id=48415165", "by": "adonese", "date": "2026-06-05", "version": null, "stance": "recommend", "quote": "I find this to put my psql in a better place as a daily driver.", "excerpt": "I find this to put my psql in a better place as a daily driver. Adding this to ~/.inputrc [1] will allow you to limit search on your entered text. Eg. select (up arrow) will loop through your psql history for commands that started with e.g., . The challenging part is in wide tables and or table with large data. Less is awkward usually so using pspg made it less awkward. I tried also to with help of ai, to write a plu", "context": "", "use_case": "daily PostgreSQL client", "switched_from": "", "story": "databow: a Rust CLI to query any database with an ADBC driver"}, {"id": 759916865, "item_id": 47494804, "url": "https://news.ycombinator.com/item?id=47494804", "by": "gpderetta", "date": "2026-03-23", "version": null, "stance": "neutral", "quote": "", "excerpt": "> This doesn't really have anything to do with async signal safety. TLS not being async signal safe is explicitly called out on the article as the reason the token is sent in clear text. > Handle it as a synchronous event in a main loop Of course of you rearchitect the client there are better solutions. But again, the article mentions that's not planned for now. By comparison, delegating cancellation to a background ", "context": "", "use_case": "Postgres command-line client", "switched_from": "", "story": "The way CTRL-C in Postgres CLI cancels queries is incredibly hack-y"}, {"id": 755359637, "item_id": 47209977, "url": "https://news.ycombinator.com/item?id=47209977", "by": "wenc", "date": "2026-03-01", "version": null, "stance": "recommend", "quote": "`psql` to probe Postgres databases.", "excerpt": "MCPs (especially remote MCPs) are like a black box API -- you don't have to install anything, provision any resources, etc. You just call it and get an answer. There's a place for that, but an MCP is ultimately a blunt instrument. CLI tools on the other hand are like precision instruments. Yes, you have to install them locally once, but after that, they have access to your local environment and can discover things on", "context": "ML work with agents", "use_case": "probing Postgres", "switched_from": "", "story": "MCP is dead. Long live the CLI"}, {"id": 741846544, "item_id": 46365409, "url": "https://news.ycombinator.com/item?id=46365409", "by": "gavinray", "date": "2025-12-23", "version": null, "stance": "recommend", "quote": "You can use \"psql\" to dump subsets of data from tables", "excerpt": "You can use \"psql\" to dump subsets of data from tables and then later import them. Something like: psql <db_url> -c \"\\copy (SELECT * FROM event_data ORDER BY created_at DESC LIMIT 100) TO 'event-data-sample.csv' WITH CSV HEADER\" https://www.postgresql.org/docs/current/sql-copy.html It'd be really nice if pg_dump had a \"data sample\"/\"data subset\" option but unfortunately nothing like that is built in that I know of.", "context": "", "use_case": "Dump table subsets", "switched_from": "", "story": "Instant database clones with PostgreSQL 18"}, {"id": 741404562, "item_id": 46337785, "url": "https://news.ycombinator.com/item?id=46337785", "by": "cuu508", "date": "2025-12-20", "version": null, "stance": "neutral", "quote": "plain psql for analyzing specific queries", "excerpt": "I use pgdash and netdata for monitoring and alerting, and plain psql for analyzing specific queries.", "context": "", "use_case": "query analysis", "switched_from": "", "story": "Go ahead, self-host Postgres"}, {"id": 734237569, "item_id": 45889848, "url": "https://news.ycombinator.com/item?id=45889848", "by": "anarazel", "date": "2025-11-11", "version": null, "stance": "neutral", "quote": "", "excerpt": "That should be trivial to change: https://github.com/postgres/postgres/blob/d2f24df19b7a42a0944a6926a0ca54168dcefe3a/src/bin/psql/command.c#L4471-L4483", "context": "", "use_case": "", "switched_from": "", "story": "Select 1 Touches 5,583 Lines of Postgres Source Code"}]}