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

From Roberto Mello
Subject Re: Primary key with oid + name : error, which solution ?
Date
Msg-id 20011031131517.A20380@cc.usu.edu
Whole thread Raw
In response to Primary key with oid + name : error, which solution ?  (Stéphane Chomat <steph_chomat@mac.com>)
List 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.


pgsql-sql by date:

Previous
From: "James Orr"
Date:
Subject: Re: transposing data for a view
Next
From: "Josh Berkus"
Date:
Subject: Re: transposing data for a view