| От | Tom Lane |
|---|---|
| Тема | Re: FKs + partial indexes? |
| Дата | |
| Msg-id | 5014.1164232477@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | FKs + partial indexes? (Andrew Dunstan <andrew@dunslane.net>) |
| Ответы |
Re: FKs + partial indexes?
|
| Список | pgsql-hackers |
Andrew Dunstan <andrew@dunslane.net> writes:
> create table constants (type text, id int primary key, value text);
> create unique index x_const_idx on constants(id) where type = 'x';
> create table client (id serial primary key; xid int references
> constants(id) using x_const_idx);
This seems like a solution in search of a problem. Why wouldn't you
just use separate reference tables? Adding such a concept would break
more things than I even want to think about (information_schema for
starters).
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера