X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id B6799D1B52A for ; Tue, 16 Dec 2003 03:39:19 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 68934-03 for ; Mon, 15 Dec 2003 23:39:01 -0400 (AST) Received: from mail.ncsa.uiuc.edu (mail.ncsa.uiuc.edu [141.142.2.28]) by svr1.postgresql.org (Postfix) with ESMTP id 2D142D1B4AD for ; Mon, 15 Dec 2003 23:38:51 -0400 (AST) X-Envelope-From: mshapiro@ncsa.uiuc.edu X-Envelope-To: Received: from osage.ncsa.uiuc.edu (osage.ncsa.uiuc.edu [141.142.2.56]) by mail.ncsa.uiuc.edu (8.11.6p2/8.11.6) with ESMTP id hBG3d2L28988 for ; Mon, 15 Dec 2003 21:39:02 -0600 Received: (from mshapiro@localhost) by osage.ncsa.uiuc.edu (8.11.6/8.11.6) id hBG3d0q31028 for pgsql-sql@postgresql.org; Mon, 15 Dec 2003 21:39:00 -0600 From: Michael Shapiro Message-Id: <200312160339.hBG3d0q31028@osage.ncsa.uiuc.edu> Subject: arrays in pl/pgsql To: pgsql-sql@postgresql.org Date: Sun, 14 Dec 2003 03:52:48 -0600 (CST) X-Mailer: ELM [version 2.5 PL2] X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/109 X-Sequence-Number: 16275 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.