Postgresql 中文操作指南
38.4. User-Defined Procedures #
过程是类似于函数的数据库对象。主要区别在于:
A procedure is a database object similar to a function. The key differences are:
以下部分中有关如何定义用户自定义函数的说明同样适用于过程,但上述要点除外。
The explanations in the following sections about how to define user-defined functions apply to procedures as well, except for the points made above.
总体而言,函数和过程也称为 routines 。有些命令(如 ALTER ROUTINE 和 DROP ROUTINE )可以对函数和过程操作,而无需知道它们是哪种类型。但是请注意,没有 CREATE ROUTINE 命令。
Collectively, functions and procedures are also known as routines. There are commands such as ALTER ROUTINE and DROP ROUTINE that can operate on functions and procedures without having to know which kind it is. Note, however, that there is no CREATE ROUTINE command.