Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parameterised view wrapper for PostgreSQL functions

We have tried to create view wrapper for PostgreSQL functions. For that, we achieved to create a view with the function call in the view definition with static values in the function call.

eg:

CREATE OR REPLACE VIEW public.my_view AS SELECT insertfunction('test', 1) AS insertfunction;

But unable to create a parameterised-view for passing our values to function call.

Any solution?

Thanks in advance Chinnu M V

like image 611
Chinnu Vijayan Avatar asked Feb 11 '26 04:02

Chinnu Vijayan


1 Answers

You cannot to pass parameters from view to inner function. This functionality is impossible in Postgres, and what I know in any database.

like image 94
Pavel Stehule Avatar answered Feb 15 '26 04:02

Pavel Stehule