Add basic demo of the add key function.
Remove usage of diag; Fix poor syntax for error handling.
Add workarounds for building against postgresql-9.1

Patches are built against pg 9.3 and does not cleanly apply against PG
9.1, the changes needed to do so however are minimal. So build a small
set of pre-patch-patches for applying before applying the real patches
for 9.1.
Improve error messages; Remove dead code
Handle no input better;