Search Postgresql Archives

Re: Arrays

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

 




2011/9/14 Bob Pawley <rjpawley@xxxxxxx>
Hi
 
Is there a method of counting the number of elements in an array??
 

Yes...

Use function array_upper [1].

See an example:

postgres@bdteste=# SELECT array_upper(ARRAY['foo', 'bar'], 1);
 array_upper 
-------------
           2
(1 row)


[1] http://www.postgresql.org/docs/current/interactive/functions-array.html
--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello


[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