setting foreigh key for an array.

Поиск
Список
Период
Сортировка
От dba
Тема setting foreigh key for an array.
Дата
Msg-id 1297680984430-3384264.post@n5.nabble.com
обсуждение исходный текст
Ответы Re: setting foreigh key for an array.  (pasman pasmański <pasman.p@gmail.com>)
Список pgsql-admin



I have a requirement.

Created table called a.
CREATE TABLE a(no int primary key,name text);


Need to create reference key for no field of array. which is belongs to b
table.
The postgresql is not allowing to create a reference for incompatible type.

CREATE TABLE d(no int[] references a,name text);
ERROR:  foreign key constraint "d_no_fkey" cannot be implemented
DETAIL:  Key columns "no" and "no" are of incompatible types: integer[] and
integer.

Is there any solution to setting foreign key for an array.

NOTE:
        Kindly ensure that I don't want to change the int to int[] in a
table.

--
View this message in context:
http://postgresql.1045698.n5.nabble.com/setting-foreigh-key-for-an-array-tp3384264p3384264.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.

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

Предыдущее
От: Stefanie Weykam
Дата:
Сообщение: Re: pdAdmin uninstall - how to get rid of temp files?
Следующее
От: dba
Дата:
Сообщение: setting foreigh key for an array.