error caused by FOREIGN KEY on composite type

Поиск
Список
Период
Сортировка
От silly8888
Тема error caused by FOREIGN KEY on composite type
Дата
Msg-id 3c8f9f940911041632y4f3c91d0v20bfb1a5743aeb6b@mail.gmail.com
обсуждение исходный текст
Ответы Re: error caused by FOREIGN KEY on composite type  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I have the following definitions:

--------------------------------------

create type mytype as (x integer, y integer);

create table foo(
    a mytype primary key,
    b integer
);

create table bar(
    a mytype references foo
);

insert into foo values((0,0)::mytype,0);

--------------------------------------

When I try to do a simple update on foo, I get an error:

test=> update foo set b=1;
ERROR:  no conversion function from mytype to record

Can someone explain what does this error mean?

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

Предыдущее
От: marcin mank
Дата:
Сообщение: Re: sudoku in an sql statement
Следующее
От: Freddy Valdebenito
Дата:
Сообщение: Manual