Re: composite type and domain - Mailing list pgsql-general

From Scott Bailey
Subject Re: composite type and domain
Date
Msg-id 4A20212F.8060200@comcast.net
Whole thread Raw
In response to Re: composite type and domain  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
List pgsql-general
Grzegorz Jaśkiewicz wrote:
> On Fri, May 29, 2009 at 3:37 AM, Scott Bailey <artacus@comcast.net> wrote:
>> Did you read the article I sent you earlier?
>
> Well, the difference here is that this way db doesn't really check
> anything :) you just choose path of execution, that you created prior.
> That's cheating :p
>
> So yes, I read that article, but that's not the right solution, it
> gives you an illusion, only if you use it the way it was meant to be
> (tm).

Fair enough, but:
1) There's nothing wrong with cheating
2) By raising an exception in the constructors when b > c, you'll get
almost the same behavior as having a domain.
3) You can't do what you want in Postgres so your only other options are
to hack the code for domains so they work with complex types or build
your type in C and create your own I/O functions... both of those are a
whole lot more work.


pgsql-general by date:

Previous
From: Emanuel Calvo Franco
Date:
Subject: Re: Pl/java in 8.4 bet1 sources compilation failed
Next
From: Kris Jurka
Date:
Subject: Re: Pl/java in 8.4 bet1 sources compilation failed