Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id F3A5C475892 for ; Fri, 5 Apr 2002 18:19:06 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g35NIJF10870; Fri, 5 Apr 2002 18:18:20 -0500 (EST) To: "Josh Berkus" Cc: Bruce Momjian , John Proctor , pgsql-sql@postgresql.org Subject: Re: 16 parameter limit In-reply-to: References: Comments: In-reply-to "Josh Berkus" message dated "Fri, 05 Apr 2002 14:29:14 -0800" Date: Fri, 05 Apr 2002 18:18:19 -0500 Message-ID: <10867.1018048699@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200204/73 X-Sequence-Number: 7338 "Josh Berkus" writes: > Tom, >> I was surprised that people were dissatisfied with 16 (it was 8 not >> very long ago...). Needing more strikes me as a symptom of either bad >> coding practices or missing features of other sorts. > No, not really. It's just people wanting to use PL/pgSQL procedures as > data filters. For example, I have a database with complex > dependancies and validation rules that I started under 7.0.3, when > RULES were not an option for such things and triggers were harder to > write. As a result, I have the interface push new records for, say, > the CLIENTS table through a PL/pgSQL procedure rather than writing to > the table directly. Since the table has 18 columns, I need (18 + 2 > for session & user) 20 parameters for this procedure. Yeah, but if we had slightly better support for rowtype parameters in plpgsql, you could do it with *three* parameters: session, user, and contents of record as a clients%rowtype structure. And it'd probably be a lot easier to read, and more maintainable in the face of changes to the clients table structure. This is why I say that needing lots of parameters may be a symptom of missing features rather than an indication that we ought to push up FUNC_MAX_ARGS. regards, tom lane