Re: Deferred partial/expression unique constraints

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Deferred partial/expression unique constraints
Дата
Msg-id 201107130223.21915.andres@anarazel.de
обсуждение исходный текст
Ответ на Re: Deferred partial/expression unique constraints  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: Deferred partial/expression unique constraints
Список pgsql-hackers
On Tuesday, July 12, 2011 08:57:44 PM Dean Rasheed wrote:
> On 12 July 2011 19:26, Josh Berkus <josh@agliodbs.com> wrote:
> > On 7/12/11 9:46 AM, Andres Freund wrote:
> >> Hi,
> >> 
> >> I guess $subject wasn't implemented because plain unique indexes aren't
> >> represented in pg_constraint and thus do not have a place to store
> >> information about being deferred?
> >> Other than that I do not see any special complications in implementing
> >> it?
> > 
> > Um, I thought that deferrable unique constraints were a 9.0 feature, no?
> 
> Yes, but there is no syntax to create a unique constraint on an
> expression, and hence to create a deferrable unique expression check.
> 
> However, that doesn't seem like such a serious limitation, because the
> same functionality can be achieved using an exclusion constraint with
> the equality operator.
That doesn't solve the issue of a partial index, right? Also I find it that 
intuitive to package a expression inside an operator (which needs to be 
complicated enough not to be accidentally used and still be expressive...). 
Especially if that expression involves more than one column (which isn't that 
hard to imagine).

Thanks,

Andres


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Full GUID support
Следующее
От: Tom Lane
Дата:
Сообщение: Tweaking the planner's heuristics for small/empty tables