# How to quickly bulk insert into postgres

**URL:** https://discourse.julialang.org/t/how-to-quickly-bulk-insert-into-postgres/15194
**Category:** Data
**Created:** [September 19, 2018, 7:07pm UTC](https://discourse.julialang.org/t/how-to-quickly-bulk-insert-into-postgres/15194 "2018-09-19T19:07:41Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![mantzaris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mantzaris/32/3852_2.png) [@mantzaris](https://discourse.julialang.org/u/mantzaris)
#### Post date: [August 5, 2019, 1:02am UTC](https://discourse.julialang.org/t/how-to-quickly-bulk-insert-into-postgres/15194/10 "2019-08-05T01:02:06Z")

</div>

> [@fborda](#):
>
> .

Will that approach with the DataFrame be any way preferable over the copyin approach of the docs `copyin = LibPQ.CopyIn("COPY libpqjl_test FROM STDIN (FORMAT CSV);", row_strings)`? I am currently struggling with the `LibPQ.CopyIn`. One there is the way they show on how to make that Iterator, and I am getting error about the UTF8 errors on some of the CSV strings. Should I just put in the DataFrame instead?

```julia
error | LibPQ]: CharacterNotInRepertoire: ERROR: invalid byte sequence for encoding "UTF8": 0xa0
ERROR: CharacterNotInRepertoire: ERROR: invalid byte sequence for encoding "UTF8": 0xa0

```

---

_[View the full topic](https://discourse.julialang.org/t/how-to-quickly-bulk-insert-into-postgres/15194)._
