From: | elein <elein(at)varlena(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | elein <elein(at)varlena(dot)com>, Jim Nasby <jnasby(at)pervasive(dot)com>, josh(at)agliodbs(dot)com, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Domains as Subtypes |
Date: | 2006-03-27 22:07:36 |
Message-ID: | 20060327220735.GR15165@varlena.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Mar 27, 2006 at 11:41:30AM -0500, Tom Lane wrote:
> elein <elein(at)varlena(dot)com> writes:
> > But I like the idea of centralizing the check in the input/output
> > functions. It seems clearer and cleaner.
>
> I remembered the problem with doing it that way: an input function can't
> enforce a domain NOTNULL constraint, because it won't even get invoked
> for a null input value. So there seems no way around having a special
> case for domains in all places where I/O conversion is done.
>
The notnull attribute of the pg_type table should be set to not null
in the case of a not null constraint on a domain (type).
You should not have to invoke the input function to check for that.
Or perhaps I'm missing the details.
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
elein
elein(at)varlena(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-03-27 22:09:13 | Re: [GENERAL] PANIC: heap_update_redo: no block |
Previous Message | Greg Stark | 2006-03-27 22:01:49 | Re: [GENERAL] PANIC: heap_update_redo: no block |