Ошибка импорта CSV в PGAdmin 4 - PullRequest
0 голосов
/ 23 мая 2018

Я пытаюсь импортировать файл csv в мою базу данных postgreSQL с помощью pgAdmin4 с помощью команды Импорт / Экспорт.Это не работает, и я не нашел решения на форумах.import csv with pgAdmin4 Вот моя ошибка: «Дополнительные данные после предполагаемого последнего столбца» Error while importing csv

А вот мой формат CSV, с запятой: csv format used

Я также пытался использовать | вместо comma.Даже когда я удаляю заголовок, он все равно говорит то же самое, что странно, я думаю (откуда ему знать, сколько там столбцов).

РЕДАКТИРОВАТЬ

Здесьмоя пустая таблица ожидает заполнения:

--
-- PostgreSQL database dump
--

-- Dumped from database version 10.3
-- Dumped by pg_dump version 10.3

-- Started on 2018-05-24 09:23:17

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- TOC entry 219 (class 1259 OID 21131)
-- Name: ouvrages_complet; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.ouvrages_complet (
    numrow integer,
    "Chute_etiage" double precision,
    "Statut" text,
    "Classement" text,
    "Commentaires" text,
    "Elements_mobiles" text
)
INHERITS (public.ouvrages);


ALTER TABLE public.ouvrages_complet OWNER TO postgres;

--
-- TOC entry 4066 (class 2604 OID 21134)
-- Name: ouvrages_complet gid; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.ouvrages_complet ALTER COLUMN gid SET DEFAULT nextval('public.ouvrages_gid_seq1'::regclass);


--
-- TOC entry 4195 (class 0 OID 21131)
-- Dependencies: 219
-- Data for Name: ouvrages_complet; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.ouvrages_complet (gid, field1, idroe, dep, courseau, masseeau, espece, nom, commune, syndicat, xl93, yl93, coefsat, notecoef, regproprio, notereg, mortdeval, notemortd, projet, noteprojet, proprio, positprop, noteposit, distconfl, gainkmouv, notegain, passepoiss, precpasse, systmont, notesysm, systdev, notesysd, usage, presenceus, noteusage, etat, noteetat, notetot, impact, anneemaj, cominsee, typeouvr, sstypeouvr, geom, franchiss, numrow, "Chute_etiage", "Statut", "Classement", "Commentaires", "Elements_mobiles") FROM stdin;
\.


-- Completed on 2018-05-24 09:23:17

--
-- PostgreSQL database dump complete
--

А вот мой CSV-файл: Ссылка на таблицу CSV

...