X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id EC00ED1E8A5 for ; Thu, 15 Apr 2004 13:21:36 -0300 (ADT) 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 05678-05 for ; Thu, 15 Apr 2004 13:21:39 -0300 (ADT) Received: from wolverine.lercnetworks.com (sabertooth.lercnetworks.com [140.99.13.90]) by svr1.postgresql.org (Postfix) with ESMTP id 78360D1DF5D for ; Thu, 15 Apr 2004 13:21:34 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) (uid 510) by wolverine.lercnetworks.com with local; Thu, 15 Apr 2004 10:03:37 -0400 References: <29772.1081913447@sss.pgh.pa.us> <407EB3DF.6010304@joeconway.com> In-Reply-To: <407EB3DF.6010304@joeconway.com> From: "Dennis" To: Joe Conway Cc: Tom Lane , postgres SQL Subject: Re: function returning array Date: Thu, 15 Apr 2004 10:03:37 -0400 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/143 X-Sequence-Number: 17518 Joe Conway writes: >> dennis'# pParsed varchar[]; > > Make that last line: > pParsed varchar[] := ''{}''; > > That initializes pParsed to an *empty* array. Otherwise pParsed is NULL, > and when you attempt to extend a NULL array, e.g. "pParsed[1] = ''blah''" > you still get NULL. Joe, thank you very much! It makes much sense now that you tell me, but it was obviously not something I thought of. Dennis pg-user a t calico-consulting dot com