[GENERAL] Is it possible to define a constraint based on the values in otherrows in the current table?

Поиск
Список
Период
Сортировка
От Glen Huang
Тема [GENERAL] Is it possible to define a constraint based on the values in otherrows in the current table?
Дата
Msg-id DB1C8829-F6ED-4BAF-A165-9A2CA5DCF932@gmail.com
обсуждение исходный текст
Ответы Re: [GENERAL] Is it possible to define a constraint based on thevalues in other rows in the current table?
Список pgsql-general
Hi,

I'd like to enforce that in a transaction, after a couple inserts & updates, a particular column has continuous values like 1, 2, 3, and never any gaps. Is it possible to do?

I gave a concrete example here: https://stackoverflow.com/questions/45187113 didn't get any answers yet.

Am I looking at the wrong direction? Should such feature be implemented with constraints?

Thanks.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] hash join performance question
Следующее
От: vinny
Дата:
Сообщение: Re: [GENERAL] Is it possible to define a constraint based on thevalues in other rows in the current table?