Search Postgresql Archives

Re: error caused by FOREIGN KEY on composite type

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

 



silly8888 <silly8888@xxxxxxxxx> writes:
> create type mytype as (x integer, y integer);

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

> create table bar(
>     a mytype references foo
> );

While that probably ought to work, is there a really good reason that
you're not doing this with a conventional two-column primary key and
foreign key?  The composite type is going to be exceedingly inefficient,
not to mention not portable to other DBMSes.

			regards, tom lane

-- 
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