Search Postgresql Archives

Re: array_agg + limit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

probably you want

select array_agg(patente) from (select patente from dia4.infaccion
ORDER BY fecha DESC LIMIT 6) x

Regards

Pavel

2010/11/27 Emanuel Calvo Franco <postgres.arg@xxxxxxxxx>:
> I'm having this 'issue':
>
> coches=# select array_agg(patente order by fecha desc) from
> dia4.infraccion limit 6;
>
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â array_agg
>
> -------------------------------------------------------------------------------------------------------------------------------------------
> --------------------------------------------------------------------------
> Â{565538,726668,639414,739391,674212,941061,636533,981958,999057,743729,548494,923939,841427,454574,363754,670514,566266,251071,852043,1537
> 11,952549,129124,446671,476345,168905,308274,404812,501024,738098,636071}
> (1 row)
>
>
> I now why it happens an how avoid it, but.... it's ok? Must work like this?
>
>
> --
> Â Â Â Â Â Â Â Emanuel Calvo Franco
> Â Â Â Â DBA | www.emanuelcalvofranco.com.ar
> Curso a distancia Nivel 1 Admin Postgres:
> Â Â http://www.postgresql-es.org/node/525
>
> --
> Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux