pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Stéphane Chomat <steph_chomat@mac.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Primary key with oid + name : error, which solution ?
Date: Wed, 31 Oct 2001 14:08:55 -0800 (PST)
Message-ID: <20011031140742.M19440-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <8DADA046-CDDE-11D5-A73B-003065C28650@mac.com>

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




view thread (5+ messages)  latest in thread

Message-ID: <20011031140742.M19440-100000@megazone23.bigpanda.com>
Permalink:  ../20011031140742.M19440-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20011031140742.M19440-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, steph_chomat@mac.com
  Subject: Re: Primary key with oid + name : error, which solution ?
  In-Reply-To: <20011031140742.M19440-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox