Re: [GENERAL] ODBC-client->Linux-server: datatype boolean not recognized?

Поиск
Список
Период
Сортировка
От jose soares
Тема Re: [GENERAL] ODBC-client->Linux-server: datatype boolean not recognized?
Дата
Msg-id 37F4CFD9.422D4975@sferacarta.com
обсуждение исходный текст
Ответ на ODBC-client->Linux-server: datatype boolean not recognized?  (Jelle Ruttenberg <ruttenberg@neroc.nl>)
Список pgsql-general
oh! this was for old releases, now I'm using the following:

create function MsBool(bool,int4) returns bool as '
declare
        bool_int int4;
begin
        if $1 is NULL then
                return NULL;
        end if;
        if $1 is TRUE then
             if $2 <> 0 then
                 return TRUE;
             end if;
        else
            if $2 = 0 then
                 return TRUE;
            end if;
         end if;
         return FALSE;
end;
' language 'plpgsql';

create operator = (
        leftarg=bool,
        rightarg=int4,
        procedure=MsBool,
        commutator='=',
        negator='!=',
        restrict=eqsel,
        join=eqjoinsel
        );
 
 

Moray McConnachie ha scritto:

>create function MsAccessBool(bool,int4)  returns bool
>  as '' language 'internal';

There is surely something missing here, between the empty single
quotes? When I execute that, I get "There is no internal function
msaccessbool"

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

Предыдущее
От: "Doran L. Barton"
Дата:
Сообщение: Keeping postmaster running or restarting
Следующее
От: leshan
Дата:
Сообщение: query string too long