Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Re: Possible bug with array_agg - Mailing list pgsql-general

From Scott Bailey
Subject Re: Possible bug with array_agg
Date
Msg-id 4B05A060.1010608@comcast.net
Whole thread Raw
In response to Re: Possible bug with array_agg  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: Possible bug with array_agg
Re: Possible bug with array_agg
List pgsql-general
Pavel Stehule wrote:
> Hello
>
> 2009/11/19 Scott Bailey <artacus@comcast.net>:
>> On 8.4.0 I found that array_agg does not return a value when fed more than
>> 12,000 values. (12,000 worked and 13,000 did not.)
>>
>
> can you send a query?
>
> postgres=# create table f(a int);
> CREATE TABLE
> postgres=# insert into f select * from generate_series(1,100000);
> INSERT 0 100000
> postgres=# select count(*) from (select unnest(array_agg(a)) from f) s;
>  count
> --------
>  100000
> (1 row)
>
> it's look well

As you were. Above worked for me as well. It appears to be a problem
with pgAdmin.

-- Returns nothing
SELECT a
FROM (
  select array_agg(a) a  from f
) s

-- Works
SELECT a
FROM (
  select array_agg(a) a  from f
  WHERE a < 12000
) s

-- Returns nothing
SELECT a
FROM (
  select array_agg(a) a  from f
  WHERE a < 13000
) s

When I ran in different client all queries returned results.

Scott

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Possible bug with array_agg
Next
From: araza@esri.com
Date:
Subject: Issues with Redhat 4 Postgresql 8.4 and support of libxml