I'm playing around with PLV8 to write trigger and stored procedures for PostgreSQL. So far I don't really see disadvantages compared to PLPGSQL. Especially if working with JSON it seems even smarter then PLPGSQL. Are there known disadvantages or limitations if using PLV8? Can PLV8 be a full replacement for PLPGSQL? It would be great if somebody could share his experience on this.
The advantages and disadvantages of PLV8 are same as advantages and disadvantages of PLPerl, PLPython and other PL languages.
PLpgSQL is perfect language for data manipulation via SQL language. Other PL is better for anything else - IO, Network, special formatting, slow numeric calculations, ...
UPDATE: since PLV8 2.3.3 (2018-04-27) supports kill signals and works pretty good. Disadvantage - you have to build it yourself. We have not migrated our code to python as we had no issues for the last 3 years.
A little bit late, but you cannot kill query currently running plv8 script, the only way is to restart the whole postgresql server. It is a huge disadvantage and our team is thinking about migrating to PLpgPython.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With