Re: (check) constraints on composite type - Mailing list pgsql-general

From Merlin Moncure
Subject Re: (check) constraints on composite type
Date
Msg-id CAHyXU0z-zfJR11VMbb=-JJFzu-W-MxpR0wAk+uXbC4dNtThYYQ@mail.gmail.com
Whole thread Raw
In response to Re: (check) constraints on composite type  ("David Johnston" <polobo@yahoo.com>)
List pgsql-general
On Tue, Jan 10, 2012 at 1:44 PM, David Johnston <polobo@yahoo.com> wrote:
> Sorry for not answering the main question but you really need to avoid
> phrases like "near future".  That said, new features are only released
> during major releases and so at best you would have to wait for 9.2 which is
> probably 9+ months out since 9.1 was just recently released.  The better
> question is whether 9.2 is likely to have what you need or whether it has a
> chance to be during 9.3 (1.5+ years out).  More generically the question is
> whether anyone is currently working on the feature.

yeah -- I've seen a bit of interest in this feature, but AFAIK
nobody's working on it, and no plausible design has been submitted
(which is a giant red flag in terms of 9.2 acceptance).  fair warning:
this is one of those items that sounds neat but is a lot more
complicated than it looks.

in the meantime, just do the workaround I do: make an immutable
function that takes your type as input, and manually apply the
constraint in various places like (like as a table constraint).

merlin

pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: string = any()
Next
From: Scott Marlowe
Date:
Subject: Re: queries timeout during backup postgres database