Re: stored procedures
| От | David G. Johnston |
|---|---|
| Тема | Re: stored procedures |
| Дата | |
| Msg-id | CAKFQuwY7hQfApeNGPZT7-JS8rGMDW4YPjkePzr7OJnc0-aunGQ@mail.gmail.com обсуждение исходный текст |
| Ответ на | stored procedures (Shaozhong SHI <shishaozhong@gmail.com>) |
| Список | pgsql-sql |
On Tue, Oct 17, 2023 at 8:54 AM Shaozhong SHI <shishaozhong@gmail.com> wrote:
How easily turn do statement scripts into stored procedures? Much modification is needed?What is the advantage to do so?
Depends on the script but possibly a matter of copy-paste for the simplest.
Advantages: The script is on the server, can require permissions, has a name (I suppose a script file does too...). Easier to deal with input parameters. Fewer components involved. Usable by components that can't issue SQL directly - e.g., GraphQL mutations.
Disadvantages: Changing the script is now a formal migration for the database instead of an application update.
David J.
В списке pgsql-sql по дате отправления: