Merge pull request #102 from tonyhuang/scale

Enforce precision and scale for upsert select.