Re: Possible bug with array_agg

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Scott Bailey <artacus(at)comcast(dot)net>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Possible bug with array_agg
Date: 2009-11-20 05:44:30
Message-ID: 162867790911192144g3d7edd1br33b52ff909eb9290@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2009/11/19 Scott Bailey <artacus(at)comcast(dot)net>:
> Pavel Stehule wrote:
>>
>> Hello
>>
>> 2009/11/19 Scott Bailey <artacus(at)comcast(dot)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.

This is pgAdmin problem - to long for cell - I thing. Usually I am
testing problematic queries in psql console.

try SELECT ARRAY(SELECT * FROM f)

it would not work in pgAdmin too - probably.

Regards
Pavel Stehule

>
> Scott
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sam Jas 2009-11-20 06:05:52 Re: Dblink to Oracle
Previous Message Scott Ribe 2009-11-20 02:39:21 pgbouncer connections used