Re: Is there a way to return "true"/"false" string for boolean type?

Поиск
Список
Период
Сортировка
От Joe Van Dyk
Тема Re: Is there a way to return "true"/"false" string for boolean type?
Дата
Msg-id CACfv+pLa8AoyTsC2qKMd_zv56SgW0MSrztJFOBjJ8vqeym6Zdw@mail.gmail.com
обсуждение исходный текст
Ответ на Is there a way to return "true"/"false" string for boolean type?  (ChoonSoo Park <luispark@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Sergey Konoplev
Дата:
Сообщение: Re: Sudden slow down and spike in system CPU causes max_connections to get exhausted
Следующее
От: ambilalmca
Дата:
Сообщение: How to know server status variable in postgresql?