Обсуждение: UNIQUE constraint fails

Поиск
Список
Период
Сортировка

UNIQUE constraint fails

От
Louis-David Mitterrand
Дата:
With 7.1b4:

test=# create table auction_type(id serial,login text,birthday timestamp);

test=# create table auction(unique(login)) inherits("auction_type");
ERROR:  inherited attribute "login" cannot be a PRIMARY KEY because it is not marked NOT NULL

But I didn't ask that "login" be a PRIMARY KEY, only a UNIQUE. What's
going on there?

Cheers,

--
    ARICIE: Vous laissez dans l'erreur un p�re qui vous aime ?
            Cruel, si de mes pleurs m�prisant le pouvoir,
            Vous consentez sans peine � ne plus me revoir,
            Partez, s�parez-vous de la triste Aricie.
                                          (Ph�dre, J-B Racine, acte 5, sc�ne 1)

Re: UNIQUE constraint fails

От
Louis-David Mitterrand
Дата:
On Fri, Feb 23, 2001 at 10:38:07AM -0500, Tom Lane wrote:
> Louis-David Mitterrand <cunctator@apartia.ch> writes:
> > With 7.1b4:
> > test=# create table auction_type(id serial,login text,birthday timestamp);
>
> > test=# create table auction(unique(login)) inherits("auction_type");
> > ERROR:  inherited attribute "login" cannot be a PRIMARY KEY because it is not marked NOT NULL
>
> This is fixed since 7.1b4.

Thanks Tom.

I hope Oliver Elphick will soon issue updated Debian packages (hint,
hint ;)

--
    OENONE: Un d�sordre �ternel r�gne dans son esprit.
            Son chagrin inquiet l'arrache de son lit.
                                          (Ph�dre, J-B Racine, acte 1, sc�ne 2)

Re: UNIQUE constraint fails

От
Tom Lane
Дата:
Louis-David Mitterrand <cunctator@apartia.ch> writes:
> With 7.1b4:
> test=# create table auction_type(id serial,login text,birthday timestamp);

> test=# create table auction(unique(login)) inherits("auction_type");
> ERROR:  inherited attribute "login" cannot be a PRIMARY KEY because it is not marked NOT NULL

This is fixed since 7.1b4.

            regards, tom lane