Re: ALTER TABLE ( smallinto -> boolean ) ...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ALTER TABLE ( smallinto -> boolean ) ...
Дата
Msg-id 6399.1125608205@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ALTER TABLE ( smallinto -> boolean ) ...  ("Marc G. Fournier" <scrappy@postgresql.org>)
Ответы Re: ALTER TABLE ( smallinto -> boolean ) ...  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
"Marc G. Fournier" <scrappy@postgresql.org> writes:
> On Mon, 29 Aug 2005, Tom Lane wrote:
>> No, because there's no built-in cast from smallint to bool.

> 'k, I just took a read through the "CREATE CAST" man page, and don't think 
> I can use that for this,

Sure you can.  Make a SQL or PLPGSQL function that does the conversion
you want and then create a cast using it.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: ALTER TABLE ( smallinto -> boolean ) ...
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Using multi-locale support in glibc