Re: Primary key with oid + name : error, which solution ?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Stéphane Chomat <steph_chomat(at)mac(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Primary key with oid + name : error, which solution ?
Date: 2001-10-31 22:08:55
Message-ID: 20011031140742.M19440-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, 31 Oct 2001, [ISO-8859-1] Stphane 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(<length>).

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stéphane Chomat 2001-10-31 22:21:25 Re: Primary key with oid + name : error, which solution ?
Previous Message Josh Berkus 2001-10-31 20:42:10 Re: transposing data for a view