Re: Backend dies when overloading + operator for bool

Поиск
Список
Период
Сортировка
От Robert B. Easter
Тема Re: Backend dies when overloading + operator for bool
Дата
Msg-id 00121916085202.02217@comptechnews
обсуждение исходный текст
Ответ на Backend dies when overloading + operator for bool  (Jeff Davis <jdavis@wasabimg.com>)
Список pgsql-bugs
On Tuesday 19 December 2000 22:11, Jeff Davis wrote:
>
> create function bool_to_int(bool) returns int as 'select 1 as result
> where $1 union select 0 as result where not $1;' language 'sql';

This is an alternative way to make the bool_to_int, but it doesn't solve your
problem unless the union was causing a bug:

CREATE FUNCTION bool_to_int(BOOLEAN) RETURNS INTEGER AS '
SELECT CASE WHEN $1 THEN 1 ELSE 0 END AS result;
' LANGUAGE 'SQL';

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

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: pg_dumpall doesn't handle all it should
Следующее
От: Bill Bunting
Дата:
Сообщение: ResultSet.getTimestamp() Exception