Re: multiset patch review

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: multiset patch review
Date: 2011-01-12 11:18:45
Message-ID: AANLkTimVmho=VG_VTuOeQTdMQnvynuOsaVpNMtcmPX+d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

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.

Regards

Pavel Stehule

2011/1/12 Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>:
> Thank you for the review.
>
> On Mon, Jan 10, 2011 at 04:13, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>> regress tests failed
> Fixed.
>
>> There is often used a fragment
>> + <----><------>fn.arg[0] = values1[n1];
>> + <----><------>fn.arg[1] = values2[n2];
>> + <----><------>fn.argnull[0] = false;
>> + <----><------>fn.argnull[1] = false;
>> + <----><------>fn.isnull = false;
>> + <----><------>r = DatumGetInt32(FunctionCallInvoke(&fn));
>> it can be moved to procedure?
>
> Agreed. I use FunctionCall2() instead of the fragments.
>
>> I see only one issue. There isn't documented, what is a MULTISET?
>
> I added a short description about MULTISET and example of operators
> in "Arrays > 8.14.7. Multiset Support" section in the docs.
> Is it enough? or what kind of information do you want?
>
> Separate patches for src and doc attached. It includes a few bug fixes
> and cleanup. I changed the error code in trim_array() to
> ERRCODE_ARRAY_ELEMENT_ERROR according to the spec.
>
> --
> Itagaki Takahiro
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2011-01-12 11:22:00 Re: ALTER TYPE 0: Introduction; test cases
Previous Message rsmogura 2011-01-12 10:12:13 Re: Fwd: Weird issues when reading UDT from stored function