Merge pull request #1 from jjd27/master

Correct the SQL name for Double; improve get_col_type debugging
Quote boolean values

This is helpful because Postgres returns the strings 't' and 'f' for values in a boolean column, but the (unquoted) literals t and f are not acceptable in queries. However, the quoted strings 't' and 'f' are accepted (see http://www.postgresql.org/docs/9.1/static/datatype-boolean.html), so this change means that you can use the value returned from Postgres in a query without needing to transform it.
Optimised ensure_inserted. Fixed bug with insert_or_update.

Ensure inserted now inserts and obtains the ID in a single query.

If one used the same field in both the condition and the update tuples in
insert_or_update, an error was thrown due to incorrect SQL syntax (double
specification of a field). This has now been fixed: fields in condition
tuples also found in update tuples are now ignored.

Signed-off-by: Rok Strniša <rok.strnisa@citrix.com>
Reverted from lastval() to full SELECT.

This was done due to the fact that we use ensure_inserted on tables that don't
have generated IDs.

Signed-off-by: Rok Strniša <rok.strnisa@citrix.com>
Add option to time execution of queries.

Signed-off-by: Rok Strniša <rok.strnisa@citrix.com>
Add an option to not show debug for " LIMIT 0" queries.

Signed-off-by: Rok Strniša <rok.strnisa@citrix.com>
handle NULL values
Support 'bigint' type (8-byte integers)
libperf is returning a quoted value for each key in arguments.log. In the case where this value is to be written to a non-string sql column, it should be safe to map the quoted value 'None' to a NULL sql value.