check constraint question

From: CS_DBA <cs_dba(at)consistentstate(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: check constraint question
Date: 2014-04-08 20:51:03
Message-ID: 53446137.7060608@consistentstate.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2014-04-08 20:58:42 Re: check constraint question
Previous Message Elliot S 2014-04-08 20:15:52 Re: Question about isolation level documentation