From stan@squaresoft.com Sat Mar 6 00:37:32 1999 Received: from mx.squaresoft.com (ns0.squaresoft.com [207.18.239.199]) by hub.org (8.9.2/8.9.1) with ESMTP id TAA73075 for ; Fri, 5 Mar 1999 19:37:32 -0500 (EST) (envelope-from stan@squaresoft.com) Received: from FF7TESTING11.SQUARESOFT.COM ([192.168.50.188]) by mx.squaresoft.com (8.7.5+2.6Wbeta6/3.4Wbeta6) with SMTP id QAA21277 for ; Fri, 5 Mar 1999 16:34:11 -0800 (PST) Message-ID: <001901be6769$d56a67e0$bc32a8c0@FF7TESTING11.SQUARESOFT.COM> From: "Stan Ng" To: Subject: Number of parameters in a sql function Date: Fri, 5 Mar 1999 16:39:45 -0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0016_01BE6726.C7259620" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 This is a multi-part message in MIME format. ------=_NextPart_000_0016_01BE6726.C7259620 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm running into a limit problem with CREATE FUNCTION. Whenever I exceed = the limit on parameters, somewhere around 12 for me, psql bombs on me = with the "pqReadData() -- backend closed the channel unexpectedly" error = message. Is there any way to increase the parameter limit for = functions? ------=_NextPart_000_0016_01BE6726.C7259620 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I'm running into a limit problem = with CREATE=20 FUNCTION. Whenever I exceed the limit on parameters, somewhere around 12 = for me,=20 psql bombs on me with the "pqReadData() -- backend closed the = channel=20 unexpectedly" error message.  Is there any way to increase the = parameter limit for functions?
------=_NextPart_000_0016_01BE6726.C7259620-- From tgl@sss.pgh.pa.us Sat Mar 6 17:21:42 1999 Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [206.210.65.6]) by hub.org (8.9.2/8.9.1) with ESMTP id MAA12086 for ; Sat, 6 Mar 1999 12:21:42 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id MAA04181; Sat, 6 Mar 1999 12:20:50 -0500 (EST) To: pgsql-sql@hub.org cc: pgsql-hackers@postgreSQL.org Subject: Re: Number of parameters in a sql function In-reply-to: Your message of Fri, 5 Mar 1999 23:00:26 -0500 (EST) <199903060400.XAA05262@hub.org> Date: Sat, 06 Mar 1999 12:20:49 -0500 Message-ID: <4179.920740849@sss.pgh.pa.us> From: Tom Lane "Stan Ng" writes: > I'm running into a limit problem with CREATE FUNCTION. Whenever I exceed > the limit on parameters, somewhere around 12 for me, psql bombs on me > with the "pqReadData() -- backend closed the channel unexpectedly" error > message. Is there any way to increase the parameter limit for > functions? It shouldn't be letting you get that high; the system limit is 8 parameters for a function. (It looks to me like parse_func.c should be, but is failing to, verify that the length of the parameter lists it is passed are within bounds --- or else gram.y itself should complain if the list is overlength.) Increasing the limit would be rather a major project I suspect. A quick look around the sources found a lot of dependencies, some being symbolic constants (not all the same one :-() and some being hard coded "8"s. Ick. Also, you would certainly be facing an initdb and database reload, because the number of argument-type columns in pg_proc would have to increase. It'd be good to clean this up and replace pg_proc's fixed-size proargtypes column with a variable-size "array of oid" column. Any volunteers? regards, tom lane From maillist@candle.pha.pa.us Sun May 9 16:02:58 1999 Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.9.3/8.9.3) with ESMTP id MAA92715 for ; Sun, 9 May 1999 12:02:58 -0400 (EDT) (envelope-from maillist@candle.pha.pa.us) Received: (from maillist@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id MAA23219; Sun, 9 May 1999 12:02:40 -0400 (EDT) From: Bruce Momjian Message-Id: <199905091602.MAA23219@candle.pha.pa.us> Subject: Re: [HACKERS] Re: Number of parameters in a sql function In-Reply-To: <4179.920740849@sss.pgh.pa.us> from Tom Lane at "Mar 6, 1999 12:20:49 pm" To: Tom Lane Date: Sun, 9 May 1999 12:02:40 -0400 (EDT) CC: PostgreSQL-development X-Mailer: ELM [version 2.4ME+ PL56 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Looks like this was fixed, because we now generate an error: test=> create function klasd (int, int, int, int, int, int, int, int, int) returns int as 'asdf' language 'c'; ERROR: Procedures cannot take more than 8 arguments > "Stan Ng" writes: > > I'm running into a limit problem with CREATE FUNCTION. Whenever I exceed > > the limit on parameters, somewhere around 12 for me, psql bombs on me > > with the "pqReadData() -- backend closed the channel unexpectedly" error > > message. Is there any way to increase the parameter limit for > > functions? > > It shouldn't be letting you get that high; the system limit is 8 > parameters for a function. (It looks to me like parse_func.c should > be, but is failing to, verify that the length of the parameter lists > it is passed are within bounds --- or else gram.y itself should complain > if the list is overlength.) > > Increasing the limit would be rather a major project I suspect. > A quick look around the sources found a lot of dependencies, some > being symbolic constants (not all the same one :-() and some being > hard coded "8"s. Ick. Also, you would certainly be facing an initdb > and database reload, because the number of argument-type columns in > pg_proc would have to increase. > > It'd be good to clean this up and replace pg_proc's fixed-size > proargtypes column with a variable-size "array of oid" column. > Any volunteers? > > regards, tom lane > > -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026