using arrays as variable, not as field

From: "Fernando Papa" <fpapa(at)claxson(dot)com>
To: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: using arrays as variable, not as field
Date: 2003-03-20 16:26:10
Message-ID: F1DC5B511E2D1C499E5E20FC6D74160D01D6D6EF@exch2000.buehuergo.corp.claxson.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I read the doc on
http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=arrays.h
tml

These doc say you can use array_dims to get the dimension of an array.
But when I try to do some this

select array_dims('{1,2,3,4,5}');

I get this message:

ERROR: Cannot accept a constant of type ANYARRAY

I see several examples on "field" arrays, but I need to use a variable
with array type inside pl/pgsql (not inside a table), and I need to know
the length of this array. My instalation is 7.3.1.

Anybody have a tip about that?

Thanks in advance!

--
Fernando O. Papa
DBA

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Daniel R. Anderson 2003-03-20 16:47:26 Re: PostgreSQL downloads compressed with bzip2 instead of
Previous Message Vadim Menshakov 2003-03-20 16:20:42 table function: limit, offset, order