error caused by FOREIGN KEY on composite type

From: silly8888 <silly8888(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: error caused by FOREIGN KEY on composite type
Date: 2009-11-05 00:32:05
Message-ID: 3c8f9f940911041632y4f3c91d0v20bfb1a5743aeb6b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ow Mun Heng 2009-11-05 01:16:12 Re: --//pgsql partitioning-///--------------------
Previous Message marcin mank 2009-11-04 23:59:25 Re: sudoku in an sql statement