Re: Domains versus polymorphic functions, redux

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, lr(at)pcorp(dot)us
Subject: Re: Domains versus polymorphic functions, redux
Date: 2011-05-24 17:13:41
Message-ID: 11302.1306257221@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Merlin Moncure <mmoncure(at)gmail(dot)com> writes:
> On Tue, May 24, 2011 at 11:12 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> 1. If a domain type is passed to an ANYARRAY argument, automatically
>> downcast it to its base type (which of course had better then be an
>> array).

> Does that mean that plpgsql %type variable declarations will see the
> base type (and miss any constraint checks?).

No, this has nothing to do with %type. What's at stake is matching to
functions/operators that are declared to take ANYARRAY.

> #2a seems cleaner to me (superficially). Got an example of a behavior
> you think is changed?

See my response to David Wheeler.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ibrar Ahmed 2011-05-24 17:21:42 "errno" not set in case of "libm" functions (HPUX)
Previous Message Tom Lane 2011-05-24 17:11:59 Re: Domains versus polymorphic functions, redux