Re: [SQL] 16 parameter limit

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, John Proctor <jproctor(at)prium(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [SQL] 16 parameter limit
Date: 2002-04-16 02:58:51
Message-ID: 200204160258.g3G2wpG01075@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches pgsql-sql


The following patch adds --maxindfuncparams to configure to allow you to
more easily set the maximum number of function parameters and columns
in an index. (Can someone come up with a better name?)

The patch also removes --def_maxbackends, which Tom reported a few weeks
ago he wanted to remove. Can people review this? To test it, you have
to run autoconf.

Are we staying at 16 as the default? I personally think we can
increase it to 32 with little penalty, and that we should increase
NAMEDATALEN to 64.

---------------------------------------------------------------------------

Tom Lane wrote:
> "Josh Berkus" <josh(at)agliodbs(dot)com> writes:
> > Personally, as a heavy user of PL/pgSQL procedures, I'm not sure you
> > need to increase the *default* number of parameters. Postgres just
> > needs to implement a parameter number change as part of a documented
> > command-line compile-time option, i.e. "--with-parameters=32".
>
> I would not object to providing such a configure option; it seems a
> reasonable thing to do. But the real debate here seems to be what
> the default should be. The ACS people would like their code to run
> on a "stock" Postgres installation, so they've been lobbying to change
> the default, not just to make it fractionally easier to build a
> non-default configuration.
>
> > Also, what is the practical maximum number of parameters?
>
> If you tried to make it more than perhaps 500, you'd start to see
> index-tuple-too-big failures in the pg_proc indexes. Realistically,
> though, I can't see people calling procedures with hundreds of
> positionally-specified parameters --- such code would be unmanageably
> error-prone.
>
> 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.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Attachment Content-Type Size
unknown_filename text/plain 4.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2002-04-16 02:59:19 Re: Stumbled upon a time bug...
Previous Message Christopher Kings-Lynne 2002-04-16 02:58:13 Re: RFC: Generating useful names for foreign keys and checks

Browse pgsql-patches by date

  From Date Subject
Next Message Hiroshi Inoue 2002-04-16 03:18:16 Re: ANSI Compliant Inserts
Previous Message Bruce Momjian 2002-04-16 02:46:23 Re: ANSI Compliant Inserts

Browse pgsql-sql by date

  From Date Subject
Next Message Rod Taylor 2002-04-16 03:19:45 Re: [PATCHES] [SQL] 16 parameter limit
Previous Message Josh Berkus 2002-04-16 02:51:11 Re: please advise on column data type