Skip to content
Advertisement

Function as parameter to another function in Postgres

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?

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?

Advertisement

Answer

I think you can’t, but since there are no anonymous functions, passing function name should do.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement