Received: from cadmus.hosts.netdirect.net.uk (cadmus.hosts.netdirect.net.uk [195.7.224.29]) by hub.org (8.8.8/8.8.8) with ESMTP id FAA02432 for ; Wed, 21 Oct 1998 05:10:00 -0400 (EDT) (envelope-from colin@wew.co.uk) Received: from Lonmay.wew.co.uk (mail.wew.co.uk [195.7.227.51]) by cadmus.hosts.netdirect.net.uk (8.9.1/8.9.1/Debian/GNU) with ESMTP id KAA02673 for ; Wed, 21 Oct 1998 10:09:58 +0100 Received: from Thurso.wew.co.uk (Thurso.wew.co.uk [126.0.0.99]) by Lonmay.wew.co.uk (8.7.1/8.7.1) with SMTP id IAA27135 for ; Wed, 21 Oct 1998 08:52:54 +0100 Message-Id: <3.0.5.32.19981021084851.007ab620@lonmay> X-Sender: colin@lonmay X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.5 (32) Date: Wed, 21 Oct 1998 08:48:51 +0100 To: pgsql-interfaces@hub.org From: Colin McKinnon Subject: Re: using indexes with the OR clause In-Reply-To: <199810210300.XAA26725@hub.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Hello all, I'm a newbie to postgres (haven't got as far as setting up odbc on my system yet) so please forgive me if I'm talking ^&*%. At 23:00 20/10/98 -0400, you wrote: >Date: Tue, 20 Oct 1998 15:52:06 +0200 >From: Sferacarta Software >Subject: using indexes with the OR clause > >Hi all, > >I'm trying v6.4beta2 via ODBC-Access. > >I have the following table: > >CREATE TABLE attivita ( > azienda CHAR(11) NOT NULL, > attivita CHAR(03) NOT NULL, > specifica CHAR(02), > cod_alternativo CHAR(10), > conto_economico CHAR(02), > inizio_attivita DATE, > fine_attivita DATE, > PRIMARY KEY (azienda,attivita,specifica,inizio_attivita) > ); > >I linked this table on M$-Access specifying the Access-key equal to >PostgreSQL PRIMARY KEY to test indexes with the OR clause but >I have the following error message: It may be nothing to do with your error but I see from your code you allow NULL values as part of the primary key. The programming style is questionable, but Access is VERY particular about not having NULL values in JET tables so I suppose it could be the same for linked tables. I would try declaring each attribute of the primary key as NOT NULL. Colin