Re: Declaring multidimensional arrays in pl/pgsql

From: Rodrigo De León <rdeleonp(at)gmail(dot)com>
To: "Max Zorloff" <zorloff(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Declaring multidimensional arrays in pl/pgsql
Date: 2007-11-29 14:11:22
Message-ID: a55915760711290611l6296d4dcic05fe54ac95b7e41@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Nov 29, 2007 3:34 AM, Max Zorloff <zorloff(at)gmail(dot)com> wrote:
> According to the docs it seems that only way would be to declare it as
> something like :
> myArray := ARRAY[[1,2], [3,4], [5,6]];

You can declare arbitrary-sized, n-dimensional arrays:
...
DECLARE
myArray integer[][]; -- two-dimensional integer array
BEGIN
...
END;
...

See:
http://www.postgresql.org/docs/8.1/static/arrays.html

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Glyn Astill 2007-11-29 14:12:04 Slony-I creation scripts not available
Previous Message Richard Huxton 2007-11-29 13:35:13 Re: 1 cluster on several servers