Обсуждение: Output format revisited - booleans

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

Output format revisited - booleans

От
Garo Hussenjian
Дата:
Is it possible to configure a boolean to output 1/0 rather than t/f by
default?

Garo.


=-=-==-=-=-==

Xapnet Internet Solutions
1501 Powell St., Suite N
Emeryville, CA 94608

Tel - (510) 655-9771
Fax - (510) 655-9775
Web - http://www.xapnet.com


Re: Output format revisited - booleans

От
Martijn van Oosterhout
Дата:
On Mon, Sep 23, 2002 at 06:43:39PM -0700, Garo Hussenjian wrote:
> Is it possible to configure a boolean to output 1/0 rather than t/f by
> default?

I don't know for sure, but there are several functions in pg_proc, not listed by \df. They (I beleive) cover these
functions. For example, there are two functions:

      Result data type       |          Name          | Argument data types
-----------------------------+------------------------+---------------------
 boolean                     | boolin                 |
 integer                     | boolout                |

I don't know what they do however. Maybe you can look at the code?

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.