From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: domain usage |
Date: | 2002-07-14 20:10:51 |
Message-ID: | 20020714201051.GA15775@wolff.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sun, Jul 14, 2002 at 14:58:14 -0400,
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> The reason it doesn't work is that d1 and d2 are treated as
> binary-compatible with int4, so the int4 = operator is found and
> applied.
>
> If we did not have this binary-compatibility behavior, domains would be
> near useless, because out-of-the-box they'd have no applicable functions
> or operators at all. Do you want to have to issue a ton of CREATE
> FUNCTION and CREATE OPERATOR commands for every domain you make?
Certainly not. I wanted a way to catch dumb mistakes earlier than I otherwise
might.
I often use tables that link two or three other tables using referenced
serial types. And if I make a mistake using it where the wrong column
gets used I generally won't catch it until I notice that my query is
returning bogus information.
I thought that in addition to being used to simplify maintaining constraints,
that there should be some way to use them for catching mistakes.
From | Date | Subject | |
---|---|---|---|
Next Message | Robert J. Sanford, Jr. | 2002-07-14 21:29:21 | OSX Install Instructions |
Previous Message | Tom Lane | 2002-07-14 18:58:14 | Re: domain usage |