Re: STORED PROCEDURES

From: Andreas Wenk <a(dot)wenk(at)netzmeister-st-pauli(dot)de>
To: JORGE MALDONADO <jorgemal1960(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: STORED PROCEDURES
Date: 2009-08-04 10:25:06
Message-ID: 4A780C82.5050809@netzmeister-st-pauli.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

JORGE MALDONADO schrieb:
> I will be using stored procedures in order to perform database
> operations (insertion, deletion and modification) and this is my first
> time. If I am going to insert a new record for example, and it contains
> 50 fields then it means that I need to define 50 input arguments in such
> a store procedure. Is this correct? If so, is it a good idea?
>
> Please advice on how to perform database operations using stored procedures.

you should have a look to the docu first:

http://www.postgresql.org/docs/8.4/interactive/server-programming.html

And her for using PL/pgSQL (the procedural language for user defined function sin PostgreSQL):

http://www.postgresql.org/docs/8.4/interactive/plpgsql.html

There you will finde several possibilities for the use of UDF.

Regarding your question you should have a look to rowtypes in special:

http://www.postgresql.org/docs/8.4/interactive/plpgsql-declarations.html#PLPGSQL-DECLARATION-ROWTYPES

Cheers

Andy

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Devrim GÜNDÜZ 2009-08-04 10:46:55 Re: Where can I find the PostgreSQL 8.2.5 binaries?
Previous Message Andreas Wenk 2009-08-04 10:19:23 Re: Where can I find the PostgreSQL 8.2.5 binaries?