Re: STORED PROCEDURES - Mailing list pgsql-novice

From Andreas Wenk
Subject Re: STORED PROCEDURES
Date
Msg-id 4A780C82.5050809@netzmeister-st-pauli.de
Whole thread Raw
In response to STORED PROCEDURES  (JORGE MALDONADO <jorgemal1960@gmail.com>)
List 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

pgsql-novice by date:

Previous
From: Andreas Wenk
Date:
Subject: Re: Where can I find the PostgreSQL 8.2.5 binaries?
Next
From: Devrim GÜNDÜZ
Date:
Subject: Re: Where can I find the PostgreSQL 8.2.5 binaries?