Re: strange error when inserting via a SRF into a table with a foreign key constraint

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: strange error when inserting via a SRF into a table with a foreign key constraint
Дата
Msg-id 20061011214339.2004.qmail@web31801.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на strange error when inserting via a SRF into a table with a foreign key constraint  ("Merlin Moncure" <mmoncure@gmail.com>)
Список pgsql-general
> create table fp1(a text, b text, primary key(a,b));
> create table foo (a text, b numeric, c text);
>
> insert into foo select 'a', 1, explode_array(string_to_array('a,b',
> ',')); -- works
> truncate foo;
> alter table foo add foreign key(a,b) references fp1(a,b) on delete cascade;
>
> insert into foo select 'a', 1, explode_array(string_to_array('a,b',
> ',')); -- fails

does it matter that fp1.b is text but foo.b is numeric?

Regards,

Richar Broersma Jr.

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

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: Re: Is it possible to return custom type as proper ROW?
Следующее
От: maa1666@yahoo.fr
Дата:
Сообщение: database corruption question