https://github.com/shish/pgosquery/blob/master/pgosquery/__i...
Wow. That does look easy.
Wow. That does look easy.
Or I guess you could start from the other direction, and make a FDW/Multicorn-compatible API for SQLite? (Facebook's OSQuery is SQLite-based, but it looks like the virtual table interface over there is way more complex)
The interface is not quite as nice as Multicorn's but certainly nicer than the C/C++ SQLlite interface. But you could probably create a wrapper around apsw so it looked similar to Multicorn.
It could be made a bit more efficient by filtering the processes[1], but the code would not look nearly as lovely.
1. http://multicorn.org/implementing-an-fdw/#idoptimizations