Re: Primary key with oid + name : error, which solution ? - Mailing list pgsql-sql

From Stéphane Chomat
Subject Re: Primary key with oid + name : error, which solution ?
Date
Msg-id 9F2CCC32-CE4D-11D5-9FB4-003065C28650@mac.com
Whole thread Raw
In response to Re: Primary key with oid + name : error, which solution ?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: Primary key with oid + name : error, which solution ?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-sql
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, à 11:08 , Stephan Szabo a écrit :


<excerpt>On Wed, 31 Oct 2001, [ISO-8859-1] Stéphane Chomat wrote:


<excerpt>I create two table repertory and person. And i have an error :


<excerpt>CREATE TABLE repertory (name_rep name, attribut text[],
PRIMARY

</excerpt>KEY(name_rep));

<excerpt>CREATE TABLE person (nam_rep repertory, name_pers text, url
text, eadr

</excerpt>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 ?

</excerpt>

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(<<length>).



</excerpt><flushright><bold><bigger>Stéphane Chomat</bigger></bold>

22 rue Le Brix

38100 Grenoble

603-999-478

steph_chomat@mac.com</flushright>

pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Primary key with oid + name : error, which solution ?
Next
From: Stephan Szabo
Date:
Subject: Re: Primary key with oid + name : error, which solution ?