Questions on domain on composite / casts ignoring domains

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Questions on domain on composite / casts ignoring domains
Date: 2014-10-20 23:51:48
Message-ID: 5445A014.1050208@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm trying to create what amounts to a new type. This would be rather easy if I could perform a CHECK on a composite type, which I could do if I could create a domain on top of a composite. Is there any reason in particular that hasn't been done?

As an alternative, I tried accomplishing this with a straight domain. That would work, except for this:

WARNING: cast will be ignored because the source data type is a domain

Why do we ignore casts from domains to other data types? I'm guessing because it's simply not what domains were meant for?
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2014-10-20 23:58:34 Re: Patch: Add launchd Support
Previous Message Tom Lane 2014-10-20 23:36:56 Re: Patch: Add launchd Support