Re: array support patch phase 1 patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: array support patch phase 1 patch
Date: 2003-06-01 15:10:53
Message-ID: 26678.1054480253@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Joe Conway <mail(at)joeconway(dot)com> writes:
> + /* last check -- polymorphic types? */
> + if (IsPolymorphicCoercible(arg1 , arg2))
> + return optup;

That is surely not what you intended. The test must be whether arg1 and
arg2 are (separately) coercible to the operator's two input types.
Moreover, the test must not be symmetric, any more than
IsBinaryCoercible is. You can coerce int[] to ANYARRAY but not vice
versa.

A bigger problem is that I doubt this will actually work. Most of the
places that call compatible_oper will then proceed to call the function
from specialized code that does not bother with consing up an expression
tree --- so a polymorphic function is going to fail anyway...

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2003-06-01 15:39:32 Re: array support patch phase 1 patch
Previous Message Manfred Spraul 2003-06-01 09:10:46 Re: ECPG thread-safety