0

I have remote postgresql database and a local csv file which I need to add to the database. I'm trying to do it with PyCharm.

Thus, I'm trying to copy data from a local file to a remote database.

If the database local is, then this command works:

COPY master_relationsextra(code, serial_number, member_type, characteristic, price_list)
FROM '/Users/name/Desktop/AUTOI.csv' with CSV HEADER delimiter ';' encoding 'ISO-8859-1';

But for the remote database it doesn't working.

Any advice how can I do that?

Boky
  • 11,554
  • 28
  • 93
  • 163

1 Answers1

1

I'm using PyCharm thus I did with PyCharm's help. All queries and commands did PyCharm for me. I did it as follows:

  • I connected to the remote database from PyCharm database pane
  • Right click on table and then import from file
  • Choose all rules and import

That did the trick for me.

Boky
  • 11,554
  • 28
  • 93
  • 163