X-Original-To: pgsql-odbc@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3301C475C60 for ; Thu, 20 Feb 2003 15:45:07 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 06693-06 for ; Thu, 20 Feb 2003 15:44:56 -0500 (EST) Received: from web20805.mail.yahoo.com (web20805.mail.yahoo.com [216.136.226.194]) by postgresql.org (Postfix) with SMTP id 5D60A475CA9 for ; Thu, 20 Feb 2003 15:34:59 -0500 (EST) Message-ID: <20030220203500.33841.qmail@web20805.mail.yahoo.com> Received: from [68.15.168.98] by web20805.mail.yahoo.com via HTTP; Thu, 20 Feb 2003 12:34:59 PST Date: Thu, 20 Feb 2003 12:34:59 -0800 (PST) From: Jeff Eckermann Subject: Re: Only fails when logging is off To: Fred Parkinson , pgsql-odbc@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/95 X-Sequence-Number: 2713 --- Fred Parkinson wrote: > Here is a problem that disappears when logging is > on: What version of PostgreSQL is this? > 2. ERROR: Unable to identify an operator "=" for > types "boolean" and "integer" > You will have to retype this query using an > explicit cast (#7) > Sounds like an old problem. Try running the following code in in PostgreSQL: CREATE FUNCTION MsAccessBool (bool, int4) RETURNS BOOL AS ' BEGIN IF $1 ISNULL 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 = MsAccessBool, COMMUTATOR = '=', NEGATOR = '<>', RESTRICT = EQSEL, JOIN = EQJOINSEL ); If this doesn't help you, please post your ODBC driver settings. I assume these are boolean fields in PostgreSQL: they should show as "yes/no" in Access. If they do not, try relinking your tables after running the above code. __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/