Re: RE:REFERENCES

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: RE:REFERENCES
Дата
Msg-id 20020310180204.P37006-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на RE:REFERENCES  ("ngterry" <ngterry@sinaman.com>)
Список pgsql-general
On Mon, 11 Mar 2002, [big5] ngterry wrote:

>
> I am sorry what I am trying is:
>
> >CREATE TABLE purchase (id int, po int, date date, PRIMARY KEY (id));
> >
> >CREATE TABLE lcopen (lc numeric, po int, PRIMARY KEY (lc));
>
> replace with:
> CREATE TABLE lcopen (lc numeric, po int REFERENCES purchase (po), PRIMARY KEY (lc));
> but there is an error and I do not how to correct that.

The target of a references constraint must be defined to be unique via
either a unique constraint or primary key constraint.  Do you really want
two separate ids on purchase?



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

Предыдущее
От: "ngterry"
Дата:
Сообщение: RE:REFERENCES
Следующее
От: Tom Lane
Дата:
Сообщение: Re: problem with upgrade from 6.5 -> 7.2 (fwd)