arrays in pl/pgsql

From: Michael Shapiro <mshapiro(at)ncsa(dot)uiuc(dot)edu>
To: pgsql-sql(at)postgresql(dot)org
Subject: arrays in pl/pgsql
Date: 2003-12-14 09:52:48
Message-ID: 200312160339.hBG3d0q31028@osage.ncsa.uiuc.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Is it possible in pl/pgsql to declare and then assign to arrays?
For example if I declare an array as follows

DECLARE
dn text[];

How do I assign the first element to a string (say 'a').
I have tried the following (which doesn't work)

dn[1] := \'a\';

The parser doesn't like the [ that follows dn.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message van Elsacker Frans 2003-12-15 15:33:21 dump and schema
Previous Message Henning.Baldersheim@devoll.no 2003-12-13 21:07:57 Re: INHERITS and Foreign keys