Received: from brasileiro.net (slxwy.dorms.usu.edu [129.123.236.160]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9VKFWP13100 for ; Wed, 31 Oct 2001 15:15:41 -0500 (EST) (envelope-from roberto@brasileiro.net) Received: from roberto by brasileiro.net with local (Exim 3.32 #1 (Debian)) id 15z1le-0005JL-00; Wed, 31 Oct 2001 13:15:18 -0700 Date: Wed, 31 Oct 2001 13:15:18 -0700 From: Roberto Mello To: St?phane Chomat Cc: pgsql-sql@postgresql.org Subject: Re: Primary key with oid + name : error, which solution ? Message-ID: <20011031131517.A20380@cc.usu.edu> References: <8DADA046-CDDE-11D5-A73B-003065C28650@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8DADA046-CDDE-11D5-A73B-003065C28650@mac.com> User-Agent: Mutt/1.3.22i X-Archive-Number: 200110/430 X-Sequence-Number: 5381 On Wed, Oct 31, 2001 at 10:06:22AM +0100, St?phane Chomat wrote: > I create two table repertory and person. And i have an error : > > > CREATE TABLE repertory (name_rep name, attribut text[], PRIMARY > KEY(name_rep)); > > CREATE TABLE person (nam_rep repertory, name_pers text, url text, > eadr text, tel text, attribut text[], PRIMARY KEY(name_pers,nam_rep)); > > NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index > 'person_pkey' for table 'person' > ERROR: DefineIndex: type repertory has no default operator class Unless it's some OO extension in PostgreSQL that I don't know about, I have never heard of the type "repertory" and "name". I don't think you can use your table name as a data type. BTW, you should also stay away from arrays (IMHO), since they are non-standard. -Roberto -- +----| http://fslc.usu.edu USU Free Software & GNU/Linux Club |------+ Roberto Mello - Computer Science, USU - http://www.brasileiro.net http://www.sdl.usu.edu - Space Dynamics Lab, Developer NY cops go bar-hopping; LA cops go night-clubbing.