building (but working?) sql extensions distilled from another project