Re: check constraint question

Поиск
Список
Период
Сортировка
От Rob Sargent
Тема Re: check constraint question
Дата
Msg-id 53446302.1080905@gmail.com
обсуждение исходный текст
Ответ на check constraint question  (CS_DBA <cs_dba@consistentstate.com>)
Ответы Re: check constraint question  (CS_DBA <cs_dba@consistentstate.com>)
Список pgsql-general
On 04/08/2014 02:51 PM, CS_DBA wrote:
Hi All

we have a table like so:


customer (
cust_id                     integer not null primary key,
cust_group_id          integer not null,
group_account_id    integer not null,
cust_name               varchar not null,

...
)

we want to force the cust_group_id to be unique across all group_account_id's but not necessarily across the entire table

I assume the best approach would be a check constraint yes? Will this be excessively poor per performance if the table gets big?

Thoughts?

Thanks in advance





A unique index on cust_group_id and group_account_id doesn't do it for you?

В списке pgsql-general по дате отправления:

Предыдущее
От: CS_DBA
Дата:
Сообщение: check constraint question
Следующее
От: CS_DBA
Дата:
Сообщение: Re: check constraint question