Using Regex to make a better comparison for string replacement.

Get's around "int4" etc. in Postgres and is more sound / cleaner than the multiple replacements we had before.

Signed-off-by: Aaron Rosenzweig <aaron@chatnbike.com>
Merge pull request #581 from recurve/ERExistsQualifier_REGEX

fix step 1 of 2