From: | Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Subject: | Re: multiset patch review |
Date: | 2011-01-30 19:34:54 |
Message-ID: | AANLkTi==t6mc3QxHfrhaSZC3Z+=+oZztO05sdL+uvcQJ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jan 31, 2011 at 04:12, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> Well, do you want to revise this and submit a stripped-down version?
>> I'm not averse to adding things that are required by the standard and
>> won't cause backward compatibility problems later.
Sure. I'll remove collect() function. I can also remove syntax support,
but it requires rework for documentation (for, IS A SET operator to
is_a_set function), so I'd like to wait for the final consensus a bit more.
> The documentation for trim_array() in the current patch version is
> pretty terrible. The documentation describe it as having the prototype
> trim_array(anyarray), but it's called in the example as
> trim(integer[], integer) - two arguments vs. one.
Oops, it's just my mistake. trim(anyarray, integer) is correct.
> Also the docs don't
> say how it decides how many elements to remove, or what happens to a
> multi-dimensional array.
I wrote the description below in the patch:
+ In <function>array_sort</>, <function>set</>, and <function>trim_array</>
+ functions, input arrays are always flattened into one-dimensional arrays.
+ In addition, the lower bounds of the arrays are adjusted to 1.
I'm not sure what is the consistent behavior for MD arrays. For example,
array_concat() is very strict, but <@ and && operators don't care about
the dimensions. I interpreted the second argument for trim_array() as
a number of "elements", but of course we can redefine it as a number of
"rows" for MD arrays.
--
Itagaki Takahiro
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-01-30 19:42:02 | Re: review: FDW API |
Previous Message | Robert Haas | 2011-01-30 19:31:09 | Re: Per-column collation, the finale |