From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: array support patch phase 1 patch |
Date: | 2003-06-01 16:54:05 |
Message-ID: | 3EDA2FAD.9080008@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Tom Lane wrote:
>>+ /* Last of the fast-paths: check for matching polymorphic arrays */
>>+ if (targettype == ANYARRAYOID)
>>+ if (get_element_type(srctype) != InvalidOid)
>>+ return true;
>
>
> This doesn't seem quite right; won't the second test succeed for NAME
> and other fixed-length-array types? You need to restrict it to varlena
> arrays, I'd think.
>
get_element_type already does -- in fact, I think that part was you're
innovation because originally I had get_typelem() which didn't make that
distinction ;-)
/*
* get_element_type
*
* Given the type OID, get the typelem (InvalidOid if not an array
* type).
*
* NB: this only considers varlena arrays to be true arrays;
* InvalidOid is returned if the input is a fixed-length array type.
*/
Joe
From | Date | Subject | |
---|---|---|---|
Next Message | Kurt Roeckx | 2003-06-01 17:40:52 | Ipv6 network cleanup patch #2. |
Previous Message | Tom Lane | 2003-06-01 16:27:02 | Re: array support patch phase 1 patch |