功能参数在Postgres的另一个功能 [英] Function as parameter to another function in Postgres
本文介绍了功能参数在Postgres的另一个功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我能否在Postgres里创建一个用户定义的函数或者通过C语言函数API或通过使用PL / pgSQL里,它接受一个回调函数作为参数?
Can I create a user defined function in Postgres either through the C-Language Function API or by using pl/pgsql which accepts a callback function as parameter?
据我看有没有办法通过C语言API来做到这一点,因为它只接受SQL数据类型并没有数据类型功能。但也许我失去了一些东西?
As far as I see there is no way to do this through the C-Language API since it only accepts sql datatypes and there is no datatype for "function". But maybe I'm missing something?
推荐答案
我觉得你不能,但因为没有匿名函数,传递函数名应该做的。
I think you can't, but since there are no anonymous functions, passing function name should do.
这篇关于功能参数在Postgres的另一个功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文