pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Number of parameters in a sql function
3+ messages / 3 participants
[nested] [flat]

* Number of parameters in a sql function
@ 1999-03-06 00:39 Stan Ng <stan@squaresoft.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Stan Ng @ 1999-03-06 00:39 UTC (permalink / raw)
  To: pgsql-sql

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?

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Number of parameters in a sql function
@ 1999-03-06 17:20 Tom Lane <tgl@sss.pgh.pa.us>
  1999-05-09 16:02 ` Re: [HACKERS] Re: Number of parameters in a sql function Bruce Momjian <maillist@candle.pha.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 1999-03-06 17:20 UTC (permalink / raw)
  To: pgsql-sql@hub.org; +Cc: pgsql-hackers@postgreSQL.org

"Stan Ng" <stan@squaresoft.com> 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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [HACKERS] Re: Number of parameters in a sql function
  1999-03-06 17:20 Re: Number of parameters in a sql function Tom Lane <tgl@sss.pgh.pa.us>
@ 1999-05-09 16:02 ` Bruce Momjian <maillist@candle.pha.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Bruce Momjian @ 1999-05-09 16:02 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: PostgreSQL-development <hackers@postgreSQL.org>

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" <stan@squaresoft.com> 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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~1999-05-09 16:02 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-03-06 00:39 Number of parameters in a sql function Stan Ng <stan@squaresoft.com>
1999-03-06 17:20 Re: Number of parameters in a sql function Tom Lane <tgl@sss.pgh.pa.us>
1999-05-09 16:02 ` Bruce Momjian <maillist@candle.pha.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox