Search Postgresql Archives

error caused by FOREIGN KEY on composite type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux