| От | Tom Lane |
|---|---|
| Тема | Re: error caused by FOREIGN KEY on composite type |
| Дата | |
| Msg-id | 10870.1257395039@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | error caused by FOREIGN KEY on composite type (silly8888 <silly8888@gmail.com>) |
| Ответы |
Re: error caused by FOREIGN KEY on composite type
|
| Список | pgsql-general |
silly8888 <silly8888@gmail.com> 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
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера