Re: Possible bug with array_agg

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: Possible bug with array_agg
Дата
Msg-id 200911192130.25285.guillaume@lelarge.info
обсуждение исходный текст
Ответ на Re: Possible bug with array_agg  (Scott Bailey <artacus@comcast.net>)
Ответы Re: Possible bug with array_agg  (Scott Bailey <artacus@comcast.net>)
Список pgsql-general
Le jeudi 19 novembre 2009 à 20:45:36, Scott Bailey a écrit :
> 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
>

I'm not sure which release you use, but it works for me (1.10 and 1.11). The
result of the first query is badly displayed (remember that it tries to
display an array of 100000 integers), but the query returns something that
pgAdmin tries to display. The others work too but the display is much better.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

В списке pgsql-general по дате отправления:

Предыдущее
От: Kovalevski Andrei
Дата:
Сообщение: Re: Encoding using the Frontend/Backend Protocol TCP/IP
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Issues with Redhat 4 Postgresql 8.4 and support of libxml