How can I obtain a count (number) of elements in a text array? Thanks.

test=# \d array
                              Table "array"
  Attribute   |  Type   |                    Modifier
--------------+---------+------------------------------------------------
 id           | integer | not null default nextval('array_id_seq'::text)
 to_group_ids | text[]  |
Index: array_pkey

test=#

--- EXAMPLE SELECT ---

test=# select to_group_ids[1] from array where id=1;
 to_group_ids
--------------
 1
(1 row)

test=#


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to