modified regression out of plv8, for test_sql