0

I have been trying to import data from a .csv file into a table (first time postgres /pgAdmin user) without success.

So I tried a simpler structure with only two columns as follows:

CREATE TABLE user
(
  firstName text,
  lastName text,
)

And this .csv:

firstName,lastName
Thomas,Johnson

My import configuration in pgAdmin4:

enter image description here

And the error I keep getting:

enter image description here

I tried changing text to varying char with enough char lenght without success..

Thank you for your help!

Wizzardzz
  • 781
  • 1
  • 9
  • 32

2 Answers2

0

Your csv file has to be like below

"firstName", "lastName"
"Thomas", "Johnson"
Nagesh Dhope
  • 797
  • 5
  • 13
0

It was a permission issue on Mac.

The .csv file needed to be moved to the \tmp folder in order to be accessible in pgAdmin4!

Wizzardzz
  • 781
  • 1
  • 9
  • 32