'How to compile procedure in postgres

Is there any alternative in postgres to compile procedure as oracle? I searched ,but couldn't find any relevant alternatives for it . Can anyone suggest on this?

alter procedure proc_name compile. in oracle

equivalent to postgres.



Solution 1:[1]

User-defined functions are interpreted in PostgreSQL, so there is no need to compile them. The function code is stored as a string, and a procedural language handler executes it when the function is called. This may of course lead to some kind of on-the-fly compilation process, but this is dependent on the procedural language being used.

PL/pgSQL does not compile anything (but it caches the plans of static SQL statements executed in the function).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Laurenz Albe