Обсуждение: text(bool) not defined

Поиск
Список
Период
Сортировка

text(bool) not defined

От
Dave Blasby
Дата:
I've noticed that text(bool) isnt a defined function (nor does
'true'::bool::text work). 

It would be great to have this defined.

Since "select 'false'::bool" gives 'f' and "select 'true'::bool" gives
't', perhaps text(bool) should return 't' or 'f'.

A case can, also, be given for returning 'true' or 'false'.

dave
ps. 7.1.2 on solaris
pps. "select boolin(true)" causes the backend to core.


Re: text(bool) not defined

От
Peter Eisentraut
Дата:
Dave Blasby writes:

> I've noticed that text(bool) isnt a defined function (nor does
> 'true'::bool::text work).

case when value then 'answer if true' else 'answer if false' end

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter