I would like to evaluate a pure-calculation string in Postgres.
For example: eval('234 + 65 * 3')
The function is NOT constant, so could also simply be 2 + 2
Expecting something like SELECT eval('2 + 2') AS result
I read about huge security issues regarding eval()
functions, but those seem to incorporate SELECT
statements. Here pure calculation requirements.