From: | Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: multiset patch review |
Date: | 2011-01-12 11:35:50 |
Message-ID: | AANLkTimJZcQpGua=3snpX4vMisgwWke7Bxk3OP-GRc_T@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jan 12, 2011 at 20:18, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> there is one issue - probably useless checking a type equality in
> function check_comparable and check_concatinatable, because when your
> function is registrated with arguments (anyarray, anyarray), then is
> guaranteed so type of array1 is same as type of array2, and then you
> don't need to check.
It's true for almost all cases, but we have "anyarray" columns in
pg_statistic.stavaluesN. When we pass them to those array functions,
element types of two anyarrays could be different.
I guess they are protections only for them.
=# SELECT A.stavalues1 SUBMULTISET OF B.stavalues1
FROM pg_statistic A, pg_statistic B
WHERE A.stakind1 = 2 AND B.stakind1 = 2;
ERROR: cannot compare incompatible arrays
DETAIL: Arrays with element types name and oid[] are not compatible
for comparison.
--
Itagaki Takahiro
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2011-01-12 12:07:22 | Re: multiset patch review |
Previous Message | Noah Misch | 2011-01-12 11:22:00 | Re: ALTER TYPE 0: Introduction; test cases |