pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Shapiro <mshapiro@ncsa.uiuc.edu>
To: pgsql-sql@postgresql.org
Subject: arrays in pl/pgsql
Date: Sun, 14 Dec 2003 03:52:48 -0600 (CST)
Message-ID: <200312160339.hBG3d0q31028@osage.ncsa.uiuc.edu> (raw)

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.





view thread (2+ messages)  latest in thread

Message-ID: <200312160339.hBG3d0q31028@osage.ncsa.uiuc.edu>
Permalink:  ../200312160339.hBG3d0q31028@osage.ncsa.uiuc.edu/
Also on:    postgresql.org/message-id/200312160339.hBG3d0q31028@osage.ncsa.uiuc.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mshapiro@ncsa.uiuc.edu
  Subject: Re: arrays in pl/pgsql
  In-Reply-To: <200312160339.hBG3d0q31028@osage.ncsa.uiuc.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox