Re: Binary data type with other output method

Поиск
Список
Период
Сортировка
Искать
От
Andrew Dunstan
Тема
Re: Binary data type with other output method
Дата
Msg-id
4771B017.60501@dunslane.net
Ответ на
Список
Дерево обсуждения
Binary data type with other output method Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>
Re: Binary data type with other output method Andrew Dunstan <andrew@dunslane.net>
Re: Binary data type with other output method imad <immaad@gmail.com>
Re: Binary data type with other output method Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>
Re: Binary data type with other output method Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>
Re: Binary data type with other output method Andrew Dunstan <andrew@dunslane.net>
Re: Binary data type with other output method Tom Lane <tgl@sss.pgh.pa.us>
Re: Binary data type with other output method Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>
Re: Binary data type with other output method Mark Mielke <mark@mark.mielke.cc>
Re: Binary data type with other output method Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>
Re: Binary data type with other output method Andrew Dunstan <andrew@dunslane.net>
Re: Binary data type with other output method Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>
Re: Binary data type with other output method Andrew Dunstan <andrew@dunslane.net>
Re: Binary data type with other output method Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>
Re: Binary data type with other output method Andrew Dunstan <andrew@dunslane.net>
Re: Binary data type with other output method Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>
Re: Binary data type with other output method Andrew Dunstan <andrew@dunslane.net>
Re: Binary data type with other output method Andrew Dunstan <andrew@dunslane.net>


Tom Lane wrote:
> Andrew Dunstan  writes:
>   
>> I think all you need to do it this:
>> Take the code for boolout() in src/backend/utils/adt/bool.c, adjust it 
>> and and make it a new function boolout2. Use pgxs to make it a loadable 
>> module.
>> Then load it and adjust the catalog entry for the bool type to use 
>> boolout2 instead of boolout.
>>     
>
> Then start fixing pg_dump, psql, and every other bit of client-side code
> that expects the boolean columns in the system catalogs to read out as
> 't'/'f' ...
>   

hmm, good point. Oh, well.

> I think you'd really need a separate type.  But have you considered
> something simple like
> 	CREATE DOMAIN boolint AS int CHECK (value = 0 OR value = 1)
>
>   

Of course, that's not exactly what he asked for. Maybe we need to know 
more about the case.

В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Andreas 'ads' Scherbaum
Дата:
FAQ