From: | John Oyler <john(dot)m(dot)oyler(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: I need help creating a composite type with some sort of constraints. |
Date: | 2009-11-24 15:13:17 |
Message-ID: | 3cc9797c0911240713k1b74c1f0g5d305c3b8cf28cca@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>
> John Oyler wrote:
>
> I can create one or more domains, and use those to create the
>> composite type from. But each domain can only be constrained in its
>> own value, I can't constrain element #1's value based on what element
>> #2's value is.
>>
>> If I create a domain from a composite, it will complain with a "ERROR:
>> cdt.instant_message is not a valid base type for a domain" error.
>>
>> I can't create a trigger for a composite either (technically it's not
>> a table, but I was hoping it might be treated as one internally).
>>
>> Is there any way to do this? Are there any plans to change or expand
>> this functionality in the future?
>>
>> Thanks,
>> John O.
>>
>
> For now you have to put all checks in custom constructor functions.
>
> Scott
>
I must not be looking in the right place... the only thing I can find that
seems remotely related, is the page on input/output functions for custom
types. And I was under the impression that only applies to non-composite
custom types. Did I miss something?
Thanks,
John O.
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2009-11-24 15:14:09 | Re: recover deleted records |
Previous Message | Denis Lussier | 2009-11-24 15:10:17 | Re: [PERFORM] Strange performance degradation |