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

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Primary key with oid + name : error, which solution ?
Дата
Msg-id 20011031140742.M19440-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Primary key with oid + name : error, which solution ?  (Stéphane Chomat <steph_chomat@mac.com>)
Ответы Re: Primary key with oid + name : error, which solution ?  (Stéphane Chomat <steph_chomat@mac.com>)
Список pgsql-sql
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>).



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: transposing data for a view
Следующее
От: Stéphane Chomat
Дата:
Сообщение: Re: Primary key with oid + name : error, which solution ?