1

Is there a way to run a PHP script from within a PL/pgSQL function? (For example, running a bash script from inside of some PL/pgSQL code.)

I have a batch of cached data stored and I need my PHP logic to clean it up properly after running some PL/pgSQL procedures.

1 Answer 1

3

No, you cannot to execute external program from PL/pgSQL. This language is "secure" language, that means, so user has not any access to potentially unsecure sources. You can try unsecure languages - PLPythonu or PLPerlu ("u" on end of name means "unsecure"), where you have full access to system sources. But only user with superuser rights can create functions in these languages. Other interesting language is plsh.

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.