Re: STORED PROCEDURES

Поиск
Список
Период
Сортировка
Искать
От
Andreas Wenk
Тема
Re: STORED PROCEDURES
Дата
Msg-id
4A780C82.5050809@netzmeister-st-pauli.de
Ответ на
STORED PROCEDURES (JORGE MALDONADO)
Список
Дерево обсуждения
STORED PROCEDURES JORGE MALDONADO <jorgemal1960@gmail.com>
Re: STORED PROCEDURES Andreas Wenk <a.wenk@netzmeister-st-pauli.de>
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 по дате отправления
От: Andreas Wenk
Дата:
От: Devrim GÜNDÜZ
Дата:
FAQ