On 1/21/14, 6:42 PM, Robert Haas wrote:
On Sun, Jan 19, 2014 at 1:41 AM, Pavel Stehule wrote:
It can be problem on my side - some strange combination of mime type. I seen
this issue before. I will recheck it tomorrow from other computer.
Doesn't matter anyway. Patch needing to strip trailing
On Sun, Jan 19, 2014 at 1:41 AM, Pavel Stehule wrote:
> 2014/1/19 Marko Tiikkaja
>> On 1/19/14, 12:21 AM, Pavel Stehule wrote:
>>> I checked it and I got a small issue
>>>
>>> bash-4.1$ patch -p1 < cardinality.patch
>>> (Stripping trailing CRs from patch.)
>>>
>>> not sure about source of this pr
On 20 January 2014 13:47, Marko Tiikkaja wrote:
> On 1/20/14 2:29 PM, Dean Rasheed wrote:
>>
>> I think this is ready for committer
>
>
> Thanks!
>
>> ... although I would also like to see
>>
>> the doc changes to make the table of array function descriptions a bit
>> more explicit about corner ca
On 1/20/14 2:29 PM, Dean Rasheed wrote:
I think this is ready for committer
Thanks!
... although I would also like to see
the doc changes to make the table of array function descriptions a bit
more explicit about corner cases.
Hmm. I completely missed the fact that unnest() already uses a
On 19 January 2014 11:43, Marko Tiikkaja wrote:
> New version attached, without the doc change.
>
This looks good to me.
- applies cleanly.
- compiles with no warnings.
- passes a sensible set of new regression tests.
- implements the agreed behaviour, per SQL spec.
- I can't think of any c
On 1/19/14, 2:12 PM, Dean Rasheed wrote:
That might seem overly pedantic, but it's quite annoying when API
documentation doesn't fully specify the behaviour, and you're forced
to use trial-and-error to find out how the functions behave.
For what it's worth, I was thinking the same thing when I
On 19 January 2014 11:43, Marko Tiikkaja wrote:
>
>
> On 1/19/14, 9:12 AM, Dean Rasheed wrote:
>>
>> On 18 January 2014 03:07, Marko Tiikkaja wrote:
>>>
>>> Here's the patch as promised. Thoughts?
>>>
>>
>> A couple of points:
>>
>> The answer for empty (zero dimensional) arrays is wrong --- you
On 1/19/14, 9:12 AM, Dean Rasheed wrote:
On 18 January 2014 03:07, Marko Tiikkaja wrote:
Here's the patch as promised. Thoughts?
A couple of points:
The answer for empty (zero dimensional) arrays is wrong --- you need
special case handling for this case to return 0.
How embarrassing.
On 18 January 2014 03:07, Marko Tiikkaja wrote:
> On 1/12/14, 5:53 AM, I wrote:
>>
>> On 1/9/14, 2:57 PM, Dean Rasheed wrote:
>>>
>>> How it should behave for multi-dimensional arrays is less clear, but
>>> I'd argue that it should return the total number of elements, i.e.
>>> cardinality('{{1,2},
2014/1/19 Marko Tiikkaja
> On 1/19/14, 12:21 AM, Pavel Stehule wrote:
>
>> I checked it and I got a small issue
>>
>> bash-4.1$ patch -p1 < cardinality.patch
>> (Stripping trailing CRs from patch.)
>>
>> not sure about source of this problem.
>>
>
> I can't reproduce the problem. In fact, I don'
On 1/19/14, 12:21 AM, Pavel Stehule wrote:
I checked it and I got a small issue
bash-4.1$ patch -p1 < cardinality.patch
(Stripping trailing CRs from patch.)
not sure about source of this problem.
I can't reproduce the problem. In fact, I don't see a single CR byte in
the patch file on my di
Hello
I checked it and I got a small issue
bash-4.1$ patch -p1 < cardinality.patch
(Stripping trailing CRs from patch.)
patching file doc/src/sgml/array.sgml
(Stripping trailing CRs from patch.)
patching file doc/src/sgml/func.sgml
(Stripping trailing CRs from patch.)
patching file src/backend/ut
On 1/12/14, 5:53 AM, I wrote:
On 1/9/14, 2:57 PM, Dean Rasheed wrote:
How it should behave for multi-dimensional arrays is less clear, but
I'd argue that it should return the total number of elements, i.e.
cardinality('{{1,2},{3,4}}'::int[][]) = 4. That would make it
consistent with the choices
2014/1/12 Marko Tiikkaja
> On 1/9/14, 2:57 PM, Dean Rasheed wrote:
>
>> Yes, this should just return the number of elements, and 0 for an empty
>> array.
>>
>> How it should behave for multi-dimensional arrays is less clear, but
>> I'd argue that it should return the total number of elements, i.e
On 1/9/14, 2:57 PM, Dean Rasheed wrote:
Yes, this should just return the number of elements, and 0 for an empty array.
How it should behave for multi-dimensional arrays is less clear, but
I'd argue that it should return the total number of elements, i.e.
cardinality('{{1,2},{3,4}}'::int[][]) = 4
On Jan10, 2014, at 15:10 , Merlin Moncure wrote:
> On Fri, Jan 10, 2014 at 6:00 AM, Florian Pflug wrote:
>> On Jan10, 2014, at 11:00 , Merlin Moncure wrote:
>>> On Fri, Jan 10, 2014 at 3:52 AM, Marko Tiikkaja wrote:
On 1/10/14, 10:41 AM, Merlin Moncure wrote:
>
> What's needed for
On Fri, Jan 10, 2014 at 6:00 AM, Florian Pflug wrote:
> On Jan10, 2014, at 11:00 , Merlin Moncure wrote:
>> On Fri, Jan 10, 2014 at 3:52 AM, Marko Tiikkaja wrote:
>>> On 1/10/14, 10:41 AM, Merlin Moncure wrote:
What's needed for better iteration support (IMO)
is a function that do
On Jan10, 2014, at 11:00 , Merlin Moncure wrote:
> On Fri, Jan 10, 2014 at 3:52 AM, Marko Tiikkaja wrote:
>> On 1/10/14, 10:41 AM, Merlin Moncure wrote:
>>>
>>> What's needed for better iteration support (IMO)
>>> is a function that does what unnest does but returns an array on
>>> indexes (one
On Fri, Jan 10, 2014 at 3:52 AM, Marko Tiikkaja wrote:
> On 1/10/14, 10:41 AM, Merlin Moncure wrote:
>>
>> What's needed for better iteration support (IMO)
>> is a function that does what unnest does but returns an array on
>> indexes (one per dimsension) -- a generalization of the
>> _pg_expandar
On 1/10/14, 10:41 AM, Merlin Moncure wrote:
What's needed for better iteration support (IMO)
is a function that does what unnest does but returns an array on
indexes (one per dimsension) -- a generalization of the
_pg_expandarray function. Lets' say 'unnest_dims'.
So unnest_dims('{{1,2},{3,4}
On Fri, Jan 10, 2014 at 2:04 AM, Dean Rasheed wrote:
> On 10 January 2014 00:36, Marko Tiikkaja wrote:
>> On 1/10/14, 1:20 AM, Merlin Moncure wrote:
>>>
>>> I'm piling on: it's not clear at all to me why you've special cased
>>> this to lower_bound=1. First of all, there are other reasons to che
On 1/10/14, 9:04 AM, Dean Rasheed wrote:
On 10 January 2014 00:36, Marko Tiikkaja wrote:
Can you point me to some examples?
The example I see all the time is code like
if array_length(nodes, 1) < 5 then
... do something ...
then you realise (or not as the case may be) that this doesn
On 10 January 2014 00:36, Marko Tiikkaja wrote:
> On 1/10/14, 1:20 AM, Merlin Moncure wrote:
>>
>> I'm piling on: it's not clear at all to me why you've special cased
>> this to lower_bound=1. First of all, there are other reasons to check
>> length than iteration.
>
Yes, I agree. A length funct
On 1/10/14, 1:20 AM, Merlin Moncure wrote:
I'm piling on: it's not clear at all to me why you've special cased
this to lower_bound=1. First of all, there are other reasons to check
length than iteration.
Can you point me to some examples?
the server API function should implement as many
reas
On Thu, Jan 9, 2014 at 11:08 AM, Marko Tiikkaja wrote:
> On 1/9/14 5:44 PM, Florian Pflug wrote:
>>
>> On Jan9, 2014, at 14:57 , Dean Rasheed wrote:
>>>
>>> On 19 December 2013 08:05, Pavel Stehule wrote:
length should be irrelevant to fact so array starts from 1, 0 or
anything
>>
On Jan9, 2014, at 23:26 , Jim Nasby wrote:
> On 1/9/14, 11:08 AM, Marko Tiikkaja wrote:
>> On 1/9/14 5:44 PM, Florian Pflug wrote:
>>> On Jan9, 2014, at 14:57 , Dean Rasheed wrote:
On 19 December 2013 08:05, Pavel Stehule wrote:
> length should be irrelevant to fact so array starts from
On 1/9/14, 11:08 AM, Marko Tiikkaja wrote:
On 1/9/14 5:44 PM, Florian Pflug wrote:
On Jan9, 2014, at 14:57 , Dean Rasheed wrote:
On 19 December 2013 08:05, Pavel Stehule wrote:
length should be irrelevant to fact so array starts from 1, 0 or anything
else
Yes, this should just return the n
On 1/9/14 5:44 PM, Florian Pflug wrote:
On Jan9, 2014, at 14:57 , Dean Rasheed wrote:
On 19 December 2013 08:05, Pavel Stehule wrote:
length should be irrelevant to fact so array starts from 1, 0 or anything
else
Yes, this should just return the number of elements, and 0 for an empty array.
On Jan9, 2014, at 14:57 , Dean Rasheed wrote:
> On 19 December 2013 08:05, Pavel Stehule wrote:
>> length should be irrelevant to fact so array starts from 1, 0 or anything
>> else
>
> Yes, this should just return the number of elements, and 0 for an empty array.
+1. Anything that complains abo
On 19 December 2013 08:05, Pavel Stehule wrote:
>
>
>
> 2013/12/19 David Fetter
>>
>> On Wed, Dec 18, 2013 at 09:27:54PM +0100, Marko Tiikkaja wrote:
>> > Hi,
>> >
>> > Attached is a patch to add support for array_length(anyarray), which
>> > only works for one-dimensional arrays, returns 0 for e
2013/12/19 David Fetter
> On Wed, Dec 18, 2013 at 09:27:54PM +0100, Marko Tiikkaja wrote:
> > Hi,
> >
> > Attached is a patch to add support for array_length(anyarray), which
> > only works for one-dimensional arrays, returns 0 for empty arrays
> > and complains if the array's lower bound isn't 1
On Wed, Dec 18, 2013 at 09:27:54PM +0100, Marko Tiikkaja wrote:
> Hi,
>
> Attached is a patch to add support for array_length(anyarray), which
> only works for one-dimensional arrays, returns 0 for empty arrays
> and complains if the array's lower bound isn't 1. In other words,
> does the right t
On 12/19/13, 12:01 AM, David Johnston wrote:
Marko Tiikkaja-4 wrote
On 2013-12-18 22:32, Andrew Dunstan wrote:
You're not really free to assume it - you'll need an exception handler
for the other-than-1 case, or your code might blow up.
This seems to be codifying a bad pattern, which should be
Marko Tiikkaja-4 wrote
> On 2013-12-18 22:32, Andrew Dunstan wrote:
>> You're not really free to assume it - you'll need an exception handler
>> for the other-than-1 case, or your code might blow up.
>>
>> This seems to be codifying a bad pattern, which should be using
>> array_lower() and array_up
On 2013-12-18 22:32, Andrew Dunstan wrote:
You're not really free to assume it - you'll need an exception handler
for the other-than-1 case, or your code might blow up.
This seems to be codifying a bad pattern, which should be using
array_lower() and array_upper() instead.
That's the entire po
On 12/18/2013 04:19 PM, Marko Tiikkaja wrote:
On 2013-12-18 22:13, Andrew Dunstan wrote:
On 12/18/2013 03:27 PM, Marko Tiikkaja wrote:
Attached is a patch to add support for array_length(anyarray), which
only works for one-dimensional arrays, returns 0 for empty arrays and
complains if the arr
On 2013-12-18 22:19, I wrote:
On 2013-12-18 22:13, Andrew Dunstan wrote:
On 12/18/2013 03:27 PM, Marko Tiikkaja wrote:
Attached is a patch to add support for array_length(anyarray), which
only works for one-dimensional arrays, returns 0 for empty arrays and
complains if the array's lower bound
On 2013-12-18 22:13, Andrew Dunstan wrote:
On 12/18/2013 03:27 PM, Marko Tiikkaja wrote:
Attached is a patch to add support for array_length(anyarray), which
only works for one-dimensional arrays, returns 0 for empty arrays and
complains if the array's lower bound isn't 1. In other words, does
On 12/18/2013 03:27 PM, Marko Tiikkaja wrote:
Hi,
Attached is a patch to add support for array_length(anyarray), which
only works for one-dimensional arrays, returns 0 for empty arrays and
complains if the array's lower bound isn't 1. In other words, does
the right thing when used with the
Hi,
Attached is a patch to add support for array_length(anyarray), which
only works for one-dimensional arrays, returns 0 for empty arrays and
complains if the array's lower bound isn't 1. In other words, does the
right thing when used with the arrays people use 99% of the time.
I'll add th
40 matches
Mail list logo