Any way to selectively color query output in psql?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Any way to selectively color query output in psql?
Date: 2016-01-07 21:25:45
Message-ID: CAKFQuwbAEU-HxLJPQN=eEXo-jFdskx8KCWhiOz3vmNEB4CWYCQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Basically I want to write this:

psql -c "SELECT E'\e[1;33m Some Text Here \e[0m';"

And have just the text "Some Text Here" colored while everything else is
default white.

The \e constructs are the ANSI color escapes which work when using echo -e

I am using bash 4.2.25(1) on Ubuntu 14.04

Is this possible?

Thanks!

David J.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gavin Flower 2016-01-07 21:32:46 Re: Any way to selectively color query output in psql?
Previous Message John R Pierce 2016-01-07 21:16:29 Re: Postgresql 9.3 not coming up after restart in centos