initial commit from https://github.com/diogob/postgres-copy/pull/21
rename pg_copy_from to pg_upsert