create function: number of parameters - Mailing list pgsql-general

From Ralph Graulich
Subject create function: number of parameters
Date
Msg-id Pine.LNX.4.21.0207160019110.11301-100000@shauny.shauny.de
Whole thread Raw
Responses Re: create function: number of parameters  (nconway@klamath.dyndns.org (Neil Conway))
List pgsql-general
Hi,


although I've been using databases for more than ten years by now, I am
rather new to postgres and stumbled upon a problem. I tried to isolate all
the application's logic dealing with data by putting all input and output
into functions.

So instead of writing complex insert/update statements, for inserting a
new record, I just want to call a function with the necessary
parameters. For example, I want to create a new customer, by calling:

SELECT create_customer('name', 'christian name', 'street', 'mailbox',
'location', 'phone number');

The function "create_customer" deals with the data and updates several
tables accordingly. My problem is, that postgres tells me I can't use more
than 16 parameters. For those basic "create" functions I need more than 40
parameters. Is there any easy way to accomplish this or do you have any
good hints for me?


Best regards
... Ralph ...



pgsql-general by date:

Previous
From: Alex Rice
Date:
Subject: Re: MySQL vs. PostgreSQL
Next
From: nconway@klamath.dyndns.org (Neil Conway)
Date:
Subject: Re: create function: number of parameters