Received: from megazone.bigpanda.com ([63.150.15.178]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9VM8wP38738 for ; Wed, 31 Oct 2001 17:08:58 -0500 (EST) (envelope-from sszabo@megazone23.bigpanda.com) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 3793FD5D7; Wed, 31 Oct 2001 14:08:55 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 253155BD8; Wed, 31 Oct 2001 14:08:55 -0800 (PST) Date: Wed, 31 Oct 2001 14:08:55 -0800 (PST) From: Stephan Szabo To: =?ISO-8859-1?Q?St=E9phane_Chomat?= Cc: Subject: Re: Primary key with oid + name : error, which solution ? In-Reply-To: <8DADA046-CDDE-11D5-A73B-003065C28650@mac.com> Message-ID: <20011031140742.M19440-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by postgresql.org id f9VMM2M41240 X-Archive-Number: 200110/432 X-Sequence-Number: 5383 On Wed, 31 Oct 2001, [ISO-8859-1] 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 > > which solution for this problem ? You'd probably be best off using the name of the repertory in the person table along with a foreign key. Also, IIRC name is mostly meant as an internal type. You probably really want varchar().