From sgnerd@yahoo.com.sg Mon Oct 20 06:24:00 2003 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 6DAFBD1B509 for ; Mon, 20 Oct 2003 06:24:00 +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 49739-09 for ; Mon, 20 Oct 2003 03:23:30 -0300 (ADT) Received: from smtp012.mail.yahoo.com (smtp012.mail.yahoo.com [216.136.173.32]) by svr1.postgresql.org (Postfix) with SMTP id 467CDD1B4F8 for ; Mon, 20 Oct 2003 03:23:28 -0300 (ADT) Received: from ptil-138-190-chn.primus-india.net (HELO IVESIA67) (sgnerd@203.196.190.138 with login) by smtp.mail.vip.sc5.yahoo.com with SMTP; 20 Oct 2003 06:23:26 -0000 Message-ID: <008d01c396d3$62d94d60$7502a8c0@hdsc.com> Reply-To: "Kumar" From: "Kumar" To: "psql" Subject: Max input parameter for a function Date: Mon, 20 Oct 2003 11:58:27 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_008A_01C39701.78B69920" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.6 tagged_above=0.0 required=5.0 tests=HTML_30_40 X-Spam-Level: X-Archive-Number: 200310/224 X-Sequence-Number: 15624 This is a multi-part message in MIME format. ------=_NextPart_000_008A_01C39701.78B69920 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear friends, While trying to allocate about 36 input parameters, I got an error saying t= hat the max input parameter for a function is only 32. Is it right? How to overcome this? Because I wanna insert records into a ta= ble of 55 columns with a lot of NULL able columns. I am using Postgres 7.3.4 on RH Linux 7.2. Note: I can't use 2 functions , one to insert 32 rows into the table first = and the update the remaining columns with other function. Because there are= only 27 columns that are not null. Please shed some light. Regards Kumar ------=_NextPart_000_008A_01C39701.78B69920 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Dear friends,
 
While trying to allocate about 36 input parameters, I g= ot an=20 error saying that the max input parameter for a function is only=20 32.
 
Is it right? How to overcome this? Because I wanna inse= rt=20 records into a table of 55 columns with a lot of NULL able columns.<= /DIV>
 
I am using Postgres 7.3.4 on RH Linux 7.2.
 
Note: I can't use 2 functions , one to insert 32 rows i= nto the=20 table first and the update the remaining columns with other function. Becau= se=20 there are only 27 columns that are not null.
 
Please shed some light.
 
Regards
Kumar

------=_NextPart_000_008A_01C39701.78B69920-- From cbbrowne@acm.org Mon Oct 20 12:43:58 2003 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 F2CCFD1B53D for ; Mon, 20 Oct 2003 12:43:58 +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 14534-06 for ; Mon, 20 Oct 2003 09:43:31 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 4FC6FD1B52C for ; Mon, 20 Oct 2003 09:43:28 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id h9KChRNw060983 for ; Mon, 20 Oct 2003 12:43:28 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id h9KCaVO2059847 for pgsql-sql@postgresql.org; Mon, 20 Oct 2003 12:36:31 GMT From: Christopher Browne X-Newsgroups: comp.databases.postgresql.sql Subject: Re: Max input parameter for a function Date: Mon, 20 Oct 2003 08:29:45 -0400 Organization: cbbrowne Computing Inc Lines: 23 Message-ID: References: <008d01c396d3$62d94d60$7502a8c0@hdsc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org X-message-flag: Outlook is rather hackable, isn't it? X-Home-Page: http://www.cbbrowne.com/info/ X-Affero: http://svcs.affero.net/rm.php?r=cbbrowne User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Reasonable Discussion, linux) Cancel-Lock: sha1:12VVqhGWcnC+U+YVqr+4m6En6X8= To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/229 X-Sequence-Number: 15629 After a long battle with technology,sgnerd@yahoo.com.sg ("Kumar"), an earthling, wrote: > While trying to allocate about 36 input parameters, I got an error saying that the max input parameter for a function is only 32. > > Is it right? How to overcome this? Because I wanna insert records into a table of 55 columns with a lot of NULL able columns. > > I am using Postgres 7.3.4 on RH Linux 7.2. > > Note: I can't use 2 functions , one to insert 32 rows into the table > first and the update the remaining columns with other > function. Because there are only 27 columns that are not null. The default compiled in is to limit the number of parameters to 32. You can recompile it and modify the number of input parameters. Somehow, the notion of a table with 55 columns strikes me as a situation where normalization is likely to be BADLY needed... -- output = reverse("gro.gultn" "@" "enworbbc") http://www.ntlug.org/~cbbrowne/linux.html Rules of the Evil Overlord #156. "If I have the hero and his party trapped, I will not wait until my Superweapon charges to finish them off if more conventional means are available." From josh@agliodbs.com Tue Oct 21 16:34:57 2003 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 487F2D1B4FD for ; Tue, 21 Oct 2003 16:34:57 +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 94667-10 for ; Tue, 21 Oct 2003 13:34:26 -0300 (ADT) Received: from davinci.ethosmedia.com (unknown [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id 28B69D1B518 for ; Tue, 21 Oct 2003 13:34:25 -0300 (ADT) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 3801673; Tue, 21 Oct 2003 09:35:04 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: "Kumar" Subject: Re: Fw: Max input parameter for a function Date: Tue, 21 Oct 2003 09:33:44 -0700 User-Agent: KMail/1.4.3 References: <010301c397b5$be61c8a0$7502a8c0@hdsc.com> In-Reply-To: <010301c397b5$be61c8a0$7502a8c0@hdsc.com> Cc: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200310210933.44713.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/266 X-Sequence-Number: 15666 Kumar, > While trying to allocate about 36 input parameters, I got an error saying > that the max input parameter for a function is only 32. > > Is it right? How to overcome this? Because I wanna insert records into a > table of 55 columns with a lot of NULL able columns. First off, if your table has 55 columns and many are nullable, then you have a database design problem ... your database is not normalized. Assuming that you can't fix your database, there's two methods you can take: 1) Rather than pushing in all of the columns as parameters, you can dump the record into a holding table (e.g. mytable_buffer) and then call a procedure to process the data there. 2) You can re-compile PostgreSQL to accept more parameters. This requires: 1. Backup your database cluster using pg_dumpall. (make sure to double-check!) 2. Shut down postgresql 3. Delete the PGDATA directory 4. Go into your postgresql source, and edit the file src/include/pg_config.h , and raise "INDEX_MAX_KEYS" to the desired level, probably 64. Warning: This may impose a minor performance penalty on Postgres! 5. Re-compile Postgres, starting with "make clean" 6. Run initdb 7. Restore your database cluster from the pg_dumpall file -- Josh Berkus Aglio Database Solutions San Francisco