我正在尝试使用pgAdmin4将csv文件导入到我的postgreSQL数据库中,并使用Import / Export。
它不起作用,我没有在论坛上找到解决方案。
这是我的错误:“假定的最后一列之后的附加数据”
我还尝试使用|
代替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文件: Link to the csv table