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.

Respectfully,
Jirge Maldonado

Search Discussions

  • Andreas Wenk at Aug 4, 2009 at 10:25 am

    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedAug 3, '09 at 11:50p
activeAug 4, '09 at 10:25a
posts2
users2
websitepostgresql.org
irc#postgresql

2 users in discussion

JORGE MALDONADO: 1 post Andreas Wenk: 1 post

People

Translate

site design / logo © 2022 Grokbase