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

From: Roberto Mello <rmello(at)cc(dot)usu(dot)edu>
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 20:15:18
Message-ID: 20011031131517.A20380@cc.usu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, Oct 31, 2001 at 10:06:22AM +0100, 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

Unless it's some OO extension in PostgreSQL that I don't know about, I
have never heard of the type "repertory" and "name". I don't think you
can use your table name as a data type.

BTW, you should also stay away from arrays (IMHO), since they are
non-standard.

-Roberto
--
+----| http://fslc.usu.edu USU Free Software & GNU/Linux Club |------+
Roberto Mello - Computer Science, USU - http://www.brasileiro.net
http://www.sdl.usu.edu - Space Dynamics Lab, Developer
NY cops go bar-hopping; LA cops go night-clubbing.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2001-10-31 20:42:10 Re: transposing data for a view
Previous Message James Orr 2001-10-31 19:59:02 Re: transposing data for a view