DBD::Pg 中是否有等价于 $dbh->sqlite_create_function

Is there an equivalent of $dbh->sqlite_create_function in DBD::Pg

我喜欢用

在 perl 中为 SQLite 创建函数的可能性
$dbh->sqlite_create_function

DBD::SQLite and I'd like to do the same for Postgres. I can't seem to find the same for DBD::Pg 中所述。

我错过了什么吗?我知道我可以使用 plperl 在数据库中完成它,但我一直在寻找一种更纯 perl 的方式。

DBI 是与所有 DBD::xxx 一起的客户端库。

sqlite_create_function 工作的原因是 SQLite 是一个嵌入式数据库,因此服务器可以直接访问 client-side 函数。

其他数据库不是这种情况,包括 PostgreSQL。

在使用其他数据库时创建自定义函数的唯一方法是服务器端的标准 create function|procedure