Postgresql 中文操作指南
45.2. Data Values in PL/Perl #
提供给 PL/Perl 函数代码的参数值只是转换为文本形式的输入参数(就像它们是由 SELECT 语句显示的一样)。相反,return 和 return_next 命令将接受任何字符串,该字符串是函数的声明返回类型的可接受输入格式。
The argument values supplied to a PL/Perl function’s code are simply the input arguments converted to text form (just as if they had been displayed by a SELECT statement). Conversely, the return and return_next commands will accept any string that is acceptable input format for the function’s declared return type.
如果这种行为对特定案例不方便,可以通过使用转换对其进行改进,如 bool 值中已说明的那样。PostgreSQL 分发中包含了多个转换模块示例。
If this behavior is inconvenient for a particular case, it can be improved by using a transform, as already illustrated for bool values. Several examples of transform modules are included in the PostgreSQL distribution.