README.md in postgres-copy-1.4.1 vs README.md in postgres-copy-1.5.0
- old
+ new
@@ -1,7 +1,9 @@
-# postgres-copy [![Build Status](https://travis-ci.org/diogob/postgres-copy.svg?branch=master)](https://travis-ci.org/diogob/postgres-copy) [![Code Climate](https://codeclimate.com/github/diogob/postgres-copy.svg)](https://codeclimate.com/github/diogob/postgres-copy)
+# postgres-copy
+![Ruby](https://github.com/diogob/postgres-copy/workflows/Ruby/badge.svg)
+
This Gem will enable your AR models to use the PostgreSQL COPY command to import/export data in CSV format.
If you need to tranfer data between a PostgreSQL database and CSV files, the PostgreSQL native CSV parser
will give you a greater performance than using the ruby CSV+INSERT commands.
I have not found time to make accurate benchmarks, but in the use scenario where I have developed the gem
I have had a four-fold performance gain.
@@ -170,9 +172,14 @@
```ruby
User.copy_from "/tmp/users.csv", :null => '', :force_null => [:name, :city]
```
+To copy from tsv file , you can set format `:tsv`
+
+```ruby
+User.copy_from "/tmp/users.tsv", :format => :tsv
+```
To copy a binary formatted data file or IO object you can specify the format as binary
```ruby
User.copy_from "/tmp/users.dat", :format => :binary