Re: how to call stored procedures that are writes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: how to call stored procedures that are writes
Дата
Msg-id 28695.1338441836@sss.pgh.pa.us
обсуждение исходный текст
Ответ на how to call stored procedures that are writes  (Ross Boylan <ross@biostat.ucsf.edu>)
Ответы Re: how to call stored procedures that are writes  (Ross Boylan <ross@biostat.ucsf.edu>)
Список pgsql-novice
Ross Boylan <ross@biostat.ucsf.edu> writes:
> 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?

Yup.  Functions are functions.

> It seems strange to use a select for something that writes rather than
> reads.

Perhaps.  We have resisted adding a separate "CALL" type of command,
though, as long as it would only be syntactic sugar for calling the same
kind of function object.  There has been a lot of discussion about
adding a different sort of stored procedure that would execute "outside"
rather than "within" the transaction engine, so that it could start and
commit multiple transactions; and if and when that happens, it would
need a different type of statement to call it.

            regards, tom lane

В списке pgsql-novice по дате отправления:

Предыдущее
От: Ross Boylan
Дата:
Сообщение: how to call stored procedures that are writes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: could not access file "$libdir/plpgsql": No such file or directory