Re:PgOSQuery: Expose the operating system as a Postgres data...
by johnteslade on Thursday October 30, 2014 @01:17PM
(#8534322)
I tried this with sqlite and the apsw python library. A quick example is at https://github.com/johnteslade/pysqliteosquery
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.
Re:PgOSQuery: Expose the operating system as a Postgres data...
by Erwin on Thursday October 30, 2014 @03:37PM
(#8535310)
FYI, you can use ":memory:" as the sqlite data source, instead of having to conditionally drop the tables (unless you actually do want to store some persistent data on disk).
Re:PgOSQuery: Expose the operating system as a Postgres data...
by johnteslade on Friday October 31, 2014 @05:32AM
(#8537964)
Good spot. The in memory table also runs 3 times quicker.
Re:PgOSQuery: Expose the operating system as a Postgres data...
by crxgames on Thursday October 30, 2014 @11:04AM
(#8533325)
That would remove some of my hesitancy in letting this run as root for full process information. At least it limits what code could be exploited in the daemon process to some extent.
Re:PgOSQuery: Expose the operating system as a Postgres data...
by mamcx on Thursday October 30, 2014 @11:04AM
(#8533323)
And the opposite? Have the sqlite storage but no the sql parser?
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)