Re: PLs and domain constraints

From: Thomas Hallgren <thomas(at)tada(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Neil Conway <neilc(at)samurai(dot)com>
Subject: Re: PLs and domain constraints
Date: 2006-01-09 19:23:40
Message-ID: 43C2B83C.7050202@tada.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Neil Conway <neilc(at)samurai(dot)com> writes:
>> For #2, I'm not sure where the right place to check domain constraints
>> is. I was thinking about adding the check to the fmgr function call
>> logic[1], but the domain checking code needs an ExprContext in which to
>> evaluate the constraint, which wouldn't easily be accessible.
>
> I'd go with making the PLs do it. fmgr is a very low logical level and
> it's inappropriate for it to even know what a domain is. As an example
> of the problems you will run into: how is fmgr going to find out whether
> the target type is a domain, much less what its constraints are? It
> can't assume that it's running inside a transaction, or even that the
> system catalog access machinery is alive yet.
>
Should I consider this as something to add to the PL/Java TODO list? Or is there more to be
discussed?

Regards,
Thomas Hallgren

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-01-09 19:28:39 Re: PLs and domain constraints
Previous Message Tom Lane 2006-01-09 18:28:26 Re: catalog corruption bug