Re: Is there a way to return "true"/"false" string for boolean type? - Mailing list pgsql-general

From Joe Van Dyk
Subject Re: Is there a way to return "true"/"false" string for boolean type?
Date
Msg-id CACfv+pLa8AoyTsC2qKMd_zv56SgW0MSrztJFOBjJ8vqeym6Zdw@mail.gmail.com
Whole thread Raw
In response to Is there a way to return "true"/"false" string for boolean type?  (ChoonSoo Park <luispark@gmail.com>)
List pgsql-general
On Tue, Jan 7, 2014 at 10:11 AM, ChoonSoo Park <luispark@gmail.com> wrote:
Hello Gurus,

I have several tables with lots of boolean columns.
When I run select query for the tables, I always get 't' or 'f' for boolean types.

Is there a way to return 'true' or 'false' string for boolean type except using CASE WHEN ... clause?
I mean global postgres configuration setting to return 'true'/'false' instead of t/f.

Question for others..

hstore(record) doesn't seem to cast the rows to text using the normal text cast, right? Why is that? 

If I have a table with a boolean column and I call hstore(table), I see 't', not 'true'. 

But true::text is 'true' and false::text is 'false'. 

pgsql-general by date:

Previous
From: Sergey Konoplev
Date:
Subject: Re: Sudden slow down and spike in system CPU causes max_connections to get exhausted
Next
From: ambilalmca
Date:
Subject: How to know server status variable in postgresql?