2

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.

2
  • 4
    There is no such thing in Postgres. What problem are you trying to solve with that? Commented Feb 18, 2022 at 7:54
  • 1
    Procedures written in C must be compiled, but outside of PostgreSQL and loaded afterwards. postgresql.org/docs/current/xfunc-c.html#DFUNC Commented Feb 18, 2022 at 8:22

1 Answer 1

6

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).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.