how to call stored procedures that are writes - Mailing list pgsql-novice

From Ross Boylan
Subject how to call stored procedures that are writes
Date
Msg-id 4FC6C0DE.6080103@biostat.ucsf.edu
Whole thread Raw
Responses Re: how to call stored procedures that are writes
List pgsql-novice
Suppose I have a function (stored procedure) whose purpose is to write
to the database.  How would I call the function from a client?  select?
It seems strange to use a select for something that writes rather than
reads.

Is there something other than functions I should use for this purpose?

I realize in some cases I could install the function as a trigger on
inserts or updates, but that also seems obscure.

E.g. I have a function f(a, b, c), where a, b, and c are single pieces
of information (e.g., a name, a date, a place) and the function f is
supposed to update one or more tables, perhaps after some processing.

Thanks.
Ross Boylan


pgsql-novice by date:

Previous
From: Steve Crawford
Date:
Subject: Re: ERROR: invalid input syntax for integer
Next
From: Tom Lane
Date:
Subject: Re: how to call stored procedures that are writes