Received: from u1.abs.net (root@u1.abs.net [207.114.0.131]) by hub.org (8.8.8/8.8.8) with ESMTP id IAA20179 for ; Wed, 21 Oct 1998 08:51:02 -0400 (EDT) (envelope-from daveh@insightdist.com) Received: from insightdist.com (nobody@localhost) by u1.abs.net (8.9.0/8.9.0) with UUCP id IAA20943 for pgsql-interfaces@hub.org; Wed, 21 Oct 1998 08:33:06 -0400 (EDT) X-Authentication-Warning: u1.abs.net: nobody set sender to insightdist.com!daveh using -f Received: from ceodev by insightdist.com (AIX 3.2/UCB 5.64/4.03) id AA29276; Wed, 21 Oct 1998 08:23:50 -0400 Received: from daveh by ceodev (AIX 4.1/UCB 5.64/4.03) id AA75160; Wed, 21 Oct 1998 08:23:49 -0400 Message-Id: <362DD338.9E52E89B@insightdist.com> Date: Wed, 21 Oct 1998 08:27:36 -0400 From: David Hartwig Organization: Insight Distribution Systems X-Mailer: Mozilla 4.05 [en] (Win95; I) Mime-Version: 1.0 To: Colin McKinnon Cc: pgsql-interfaces@hub.org Subject: Re: [INTERFACES] Re: using indexes with the OR clause References: <3.0.5.32.19981021084851.007ab620@lonmay> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Colin McKinnon wrote: > 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. > In PostgreSQL the PRIMARY KEY clause forces an implied NOT NULL on each specified column.