From: jose soares <jose@sferacarta.com>
To: Moray McConnachie <moray.mcconnachie@computing-services.oxford.ac.uk>
Cc: postgresql-general <pgsql-general@postgresql.org>
Subject: Re: [GENERAL] ODBC-client->Linux-server: datatype boolean not recognized?
Date: Fri, 01 Oct 1999 17:14:33 +0200
Message-ID: <37F4CFD9.422D4975@sferacarta.com> (raw)
References: <199909301033.MAA06992@mail.neroc.nl>
<37F35BF3.862BC069@sferacarta.com>
<01d101bf0b57$f4aaae70$760e01a3@oucs.ox.ac.uk>
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"
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: jose@sferacarta.com, moray.mcconnachie@computing-services.oxford.ac.uk, pgsql-general@postgresql.org
Subject: Re: [GENERAL] ODBC-client->Linux-server: datatype boolean not recognized?
In-Reply-To: <37F4CFD9.422D4975@sferacarta.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox