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 85D9AD1CCA7 for ; Wed, 14 Apr 2004 01:12:32 -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 28295-05 for ; Wed, 14 Apr 2004 01:12:30 -0300 (ADT) Received: from joeconway.com (66-146-172-82.skyriver.net [66.146.172.82]) by svr1.postgresql.org (Postfix) with ESMTP id D3CC4D1BB93 for ; Wed, 14 Apr 2004 01:12:29 -0300 (ADT) Received: from [69.82.12.196] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 1387991; Tue, 13 Apr 2004 21:06:43 -0700 Message-ID: <407CB9A7.4010101@joeconway.com> Date: Tue, 13 Apr 2004 21:10:15 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dennis Cc: postgres SQL Subject: Re: function returning array References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/125 X-Sequence-Number: 17500 Dennis wrote: > I am trying to return an array from a function and don't seem to be > having luck. The function seems to work fine, but if I do assignment to > an array variable, I get null in the array elements > DECLARE > results varchar[]; > tmpv varchar; > BEGIN > -- now call func that returns varchar[] > results := parseString(''abc,def,ghi'','',''); > tmpv := results[1]; > RAISE NOTICE '' tmpv = % '',tmpv; -- tmpv will be null. > > END; How is parseString() defined? What Postgres version? Joe