Re: Domains and type coercion

From: Thomas Lockhart <thomas(at)fourpalms(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Domains and type coercion
Date: 2002-03-21 13:51:50
Message-ID: 3C99E576.F9E12B01@fourpalms.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

...
> The problem seems to be that when parse_func looks for "exact match"
> operators, it doesn't consider numeric to be an exact match for mydom.
> So that heuristic fails and we're left with no unique best choice for
> the operator.

Sure. At the moment there is no reason for parse_func to think that
mydom is anything, right?

> I'm not sure if there's anything much that can be done about this.

Something has to be done ;)

> We could treat exact and binary-compatible matches alike (doesn't seem
> good), or put a special case into the operator selection rules to reduce
> domains to their basetypes before making the "exact match" test.
> Neither of these seem real appealing, but if we don't do something
> I think that domains are going to be a big pain in the neck to use.

There could also be an explicit heuristic *after* the exact match
gathering to look for an exact match for domains reduced to their base
types. Is there any reason to look for domains before that?

- Thomas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2002-03-21 15:03:20 Re: Domain Support -- another round
Previous Message Zeugswetter Andreas SB SD 2002-03-21 13:34:41 Re: Function call crashes server