Robert H
Robert H

Reputation: 11730

How do I displaying large amounts of boolean values in PostgreSQL 9.1.9 without causing eye strain?

How do I display large amounts of boolean values in PostgreSQL 9.1.9 without causing eye strain?

The issue I have is that various PostgreSQL clients display boolean values as t/f, and when looking at a the data it can be difficult to distinguish the values:

enter image description here

Upvotes: 1

Views: 88

Answers (1)

Robert H
Robert H

Reputation: 11730

Playing with casting, you can cast the boolean value as ::text to get its text value of true or false which outputs (the equally as bad):

enter image description here

or to resolve the issue, use case statements:

CASE WHEN dt.x12_940 THEN 'TRUE' ELSE '' END AS x12_940,

to output:

enter image description here

Upvotes: 3

Related Questions