Syntax Highlighting in Bash Terminal for PostgreSQL

Syntax Highlighting in Bash Terminal for PostgreSQL

Hey there, fellow Linux enthusiasts! I’ve been exploring the possibilities of syntax highlighting in the bash terminal for PostgreSQL. As someone familiar with the basics of Linux, I thought it would be cool to have this feature right in the standard bash terminal, rather than relying on external text editors like pgadmin4 or Visual Studio Code.

I spent a couple of hours digging around in the bash terminal to see if it’s possible to get PostgreSQL to highlight keywords. While I couldn’t figure it out, I’m wondering if anyone can confirm if it’s even possible. Would I need to save a script and run it to make it happen?

I’m running OS Mint Cinnamon 22.1 (Debian) with PostgreSQL version 16.x. If you’ve got any insights or solutions, I’d love to hear them!

Leave a Comment

Your email address will not be published. Required fields are marked *