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 ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]