pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Import csv in PostgreSQL
2+ messages / 2 participants
[nested] [flat]

* Import csv in PostgreSQL
@ 2018-10-15 05:42 Dinesh Chandra 12108 <Dinesh.Chandra@cyient.com>
  2018-10-15 06:09 ` Re: Import csv in PostgreSQL Gabi D <gabid33@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Dinesh Chandra 12108 @ 2018-10-15 05:42 UTC (permalink / raw)
  To: pgsql-performance; +Cc: pgsql-performance-owner@postgresql.org <pgsql-performance-owner@postgresql.org>

Hi,

I have a CSV file having only 400 records.

I have to import it in DB table, it's working fine but why it's importing 1047303 rows as I have only 400 records are present in that file.
Could you please help me on this?

[cid:image001.png@01D46477.F29B0B00]

Regards,
Dinesh Chandra


________________________________

DISCLAIMER:

This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Check all attachments for viruses before opening them. All views or opinions presented in this e-mail are those of the author and may not reflect the opinion of Cyient or those of our affiliates.

Attachments:

  [image/png] image001.png (2.7K, ../../d3d51b180d0e473893d605d861a36d6e@cyient.com/3-image001.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Import csv in PostgreSQL
  2018-10-15 05:42 Import csv in PostgreSQL Dinesh Chandra 12108 <Dinesh.Chandra@cyient.com>
@ 2018-10-15 06:09 ` Gabi D <gabid33@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Gabi D @ 2018-10-15 06:09 UTC (permalink / raw)
  To: Dinesh.Chandra@cyient.com; +Cc: pgsql-performance; pgsql-performance-owner@postgresql.org

it must be something in your data. either you have ',' (which you specified
as your delimiter) in the data itself or you have end of line chars
embedded in the data. Try a file with one row only and see what happens. If
it's ok try a few more - possibly the problem lies in some other row. add
more lines until you can see the problem happening and then identify the
problem row(s) / char(s).
Possibly also try using the encoding parameter for the copy command or for
the query/procedure that you use to issue the data to file


On Mon, Oct 15, 2018 at 8:43 AM Dinesh Chandra 12108 <
Dinesh.Chandra@cyient.com> wrote:

> Hi,
>
>
>
> I have a CSV file having only 400 records.
>
>
>
> I have to import it in DB table, it’s working fine but why it’s importing
> 1047303 rows as I have only 400 records are present in that file.
>
> Could you please help me on this?
>
>
>
>
>
> *Regards,*
>
> *Dinesh Chandra*
>
>
>
> ------------------------------
>
> DISCLAIMER:
>
> This email message is for the sole use of the intended recipient(s) and
> may contain confidential and privileged information. Any unauthorized
> review, use, disclosure or distribution is prohibited. If you are not the
> intended recipient, please contact the sender by reply email and destroy
> all copies of the original message. Check all attachments for viruses
> before opening them. All views or opinions presented in this e-mail are
> those of the author and may not reflect the opinion of Cyient or those of
> our affiliates.
>

Attachments:

  [image/png] image001.png (2.7K, ../../CAC7ivptPV5Uxx=mJ6=h=Y5aDr6ZqVNLg5wPNL_4C2Syk==e8HQ@mail.gmail.com/3-image001.png)
  download | view image

  [image/png] image001.png (2.7K, ../../CAC7ivptPV5Uxx=mJ6=h=Y5aDr6ZqVNLg5wPNL_4C2Syk==e8HQ@mail.gmail.com/4-image001.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-10-15 06:09 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-10-15 05:42 Import csv in PostgreSQL Dinesh Chandra 12108 <Dinesh.Chandra@cyient.com>
2018-10-15 06:09 ` Gabi D <gabid33@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox