Received: from smtpout.mac.com ([204.179.120.86]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9VMMOP41304 for ; Wed, 31 Oct 2001 17:22:24 -0500 (EST) (envelope-from steph_chomat@mac.com) Received: from smtp-relay02.mac.com (smtp-relay02-qfe3 [10.13.10.225]) by smtpout.mac.com (8.10.2/8.10.2/1.0) with ESMTP id f9VMKXW11856 for ; Wed, 31 Oct 2001 14:20:33 -0800 (PST) Received: from asmtp01.mac.com ([10.13.10.65]) by smtp-relay02.mac.com (Netscape Messaging Server 4.15 relay02 Jun 21 2001 23:53:48) with ESMTP id GM3CT400.FNR for ; Wed, 31 Oct 2001 14:22:16 -0800 Received: from localhost ([217.128.128.146]) by asmtp01.mac.com (Netscape Messaging Server 4.15 asmtp01 Jun 21 2001 23:53:48) with ESMTP id GM3CT300.F0T; Wed, 31 Oct 2001 14:22:15 -0800 Date: Wed, 31 Oct 2001 23:21:25 +0100 Subject: Re: Primary key with oid + name : error, which solution ? Content-Type: multipart/alternative; boundary=Apple-Mail-1-489881798 Mime-Version: 1.0 (Apple Message framework v472) Cc: To: Stephan Szabo From: =?ISO-8859-1?Q?St=E9phane_Chomat?= In-Reply-To: <20011031140742.M19440-100000@megazone23.bigpanda.com> Message-Id: <9F2CCC32-CE4D-11D5-9FB4-003065C28650@mac.com> X-Mailer: Apple Mail (2.472) X-Archive-Number: 200110/433 X-Sequence-Number: 5384 --Apple-Mail-1-489881798 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; format=flowed Yes, name is an internal type. The problem is in the type of the table=20 repertory. If it is not possible to use this syntaxe, i will take the type char. I just try the=20 new possibility of postgressql. thanks. steph. Le mercredi 31 octobre 2001, =E0 11:08 , Stephan Szabo a =E9crit : > On Wed, 31 Oct 2001, [ISO-8859-1] St=E9phane 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=20 >> '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(). > > St=E9phane Chomat 22 rue Le Brix 38100 Grenoble 603-999-478 steph_chomat@mac.com --Apple-Mail-1-489881798 Content-Transfer-Encoding: quoted-printable Content-Type: text/enriched; charset=ISO-8859-1 Yes, name is an internal type. The problem is in the type of the table repertory. If it is not possible to use this syntaxe, i will take the type char. I just try the new possibility of postgressql. thanks. steph. Le mercredi 31 octobre 2001, =E0 11:08 , Stephan Szabo a =E9crit : On Wed, 31 Oct 2001, [ISO-8859-1] St=E9phane 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(<). St=E9phane Chomat 22 rue Le Brix 38100 Grenoble 603-999-478 steph_chomat@mac.com --Apple-Mail-1-489881798--