Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 893009FA2A0 for ; Fri, 29 Sep 2006 12:00:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 93823-02 for ; Fri, 29 Sep 2006 15:00:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail731.megamailservers.com (mail731.megamailservers.com [69.49.98.41]) by postgresql.org (Postfix) with ESMTP id 061879FA13E for ; Fri, 29 Sep 2006 12:00:22 -0300 (ADT) X-Authenticated-User: paul.a.pnlassociates.com Received: from [69.3.2.106] (h-69-3-2-106.mclnva23.covad.net [69.3.2.106]) (authenticated bits=0) by mail731.megamailservers.com (8.13.6.20060614/8.13.1) with ESMTP id k8TF0DwY025268 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 29 Sep 2006 11:00:17 -0400 Message-ID: <451D34FD.3050709@pnlassociates.com> Date: Fri, 29 Sep 2006 11:00:13 -0400 From: "Paul B. Anderson" User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: Stored procedure array limits References: <451C48AB.6090508@pnlassociates.com> <9461.1159502232@sss.pgh.pa.us> In-Reply-To: <9461.1159502232@sss.pgh.pa.us> Content-Type: multipart/alternative; boundary="------------010408050305040101070404" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.497 tagged_above=0 required=5 tests=HTML_40_50, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200609/366 X-Sequence-Number: 23280 This is a multi-part message in MIME format. --------------010408050305040101070404 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I've checked my code and it does not seem to run past any limits. I am filling the arrays in sequential order, extending each one in parallel with the others. The null problem fixed the code for some cases but I'm still having problems in general and with the same error message but reported in another place. Paul Tom Lane wrote: > "Paul B. Anderson" writes: > >> I have a large stored procedure with 16 arrays, mostly varchar, each >> with dimension 3000. The procedure works fine on a small number of rows >> used from these arrays but gets the following error for large rowsets: >> > > >> ERROR: invalid array subscripts >> > > Right offhand I only see that error being thrown for out-of-range array > subscripts. Are you maybe trying to fill the arrays in nonsequential > order? > > >> If I comment out two particular arrays (that can have null values), it >> also runs OK. >> > > As already noted, we don't support nulls in arrays before 8.2, but > I'm not exactly sure how that omission leads to this error message. > > regards, tom lane > > . > > --------------010408050305040101070404 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I've checked my code and it does not seem to run past any limits.  I am filling the arrays in sequential order, extending each one in parallel with the others.

The null problem fixed the code for some cases but I'm still having problems in general and with the same error message but reported in another place.

Paul


Tom Lane wrote:
"Paul B. Anderson" <paul.a@pnlassociates.com> writes:
  
I have a large stored procedure with 16 arrays, mostly varchar, each 
with dimension 3000.  The procedure works fine on a small number of rows 
used from these arrays but gets the following error for large rowsets:
    

  
  ERROR:  invalid array subscripts
    

Right offhand I only see that error being thrown for out-of-range array
subscripts.  Are you maybe trying to fill the arrays in nonsequential
order?

  
If I comment out two particular arrays (that can have null values), it 
also runs OK.
    

As already noted, we don't support nulls in arrays before 8.2, but
I'm not exactly sure how that omission leads to this error message.

			regards, tom lane

.

  
--------------010408050305040101070404--