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

From jose soares
Subject Re: [GENERAL] ODBC-client->Linux-server: datatype boolean not recognized?
Date
Msg-id 37F4CFD9.422D4975@sferacarta.com
Whole thread Raw
In response to ODBC-client->Linux-server: datatype boolean not recognized?  (Jelle Ruttenberg <ruttenberg@neroc.nl>)
List 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 by date:

Previous
From: "Doran L. Barton"
Date:
Subject: Keeping postmaster running or restarting
Next
From: leshan
Date:
Subject: query string too long