error caused by FOREIGN KEY on composite type - Mailing list pgsql-general

From silly8888
Subject error caused by FOREIGN KEY on composite type
Date
Msg-id 3c8f9f940911041632y4f3c91d0v20bfb1a5743aeb6b@mail.gmail.com
Whole thread Raw
Responses Re: error caused by FOREIGN KEY on composite type  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: marcin mank
Date:
Subject: Re: sudoku in an sql statement
Next
From: Freddy Valdebenito
Date:
Subject: Manual