From: | "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> |
---|---|
To: | Andrés Repossi <andres(dot)repossi(at)c1(dot)pjn(dot)gov(dot)ar>, <pgadmin-support(at)postgresql(dot)org> |
Subject: | Re: About COPY |
Date: | 2003-02-24 15:02:41 |
Message-ID: | 03AF4E498C591348A42FC93DEA9661B885BF@mail.vale-housing.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
Hi,
pgAdmin doesn't use the copy command, that's PostgreSQL's psql interface. A list like pgsq-general(at)postgresql(dot)org is more appropriate for such questions.
Shouldn't it be 'WITH DELIMITER' though?
Regards, Dave.
-----Original Message-----
From: Andrés Repossi [mailto:andres(dot)repossi(at)c1(dot)pjn(dot)gov(dot)ar]
Sent: 24 February 2003 14:50
To: pgadmin-support(at)postgresql(dot)org
Subject: [pgadmin-support] About COPY
Hi, I'm new working with PostgreSQL, and I'm trying to load an ascii text file to a table using the command copy but it throws me an error message that it can't parse the line, and I don't really don't know why is this hapening.
The sentence that I'm using is this:
copy tfal from 'C:\\tfal.txt' using delimiter '|'
Te error message is: ERROR: parser: parse error at or near "delimiter"
The tfal.txt has only one row, and the format of the row is:
5|M|118 |BELLAFRONTE|LUIS|0|0|0|1996|9|15|818 |2 |54 |1996|B|||1996|11|1|0|02/04/2003|
and, the schema of the table is:
CREATE TABLE tfal (
tfal_dni int4 NOT NULL,
tfal_sexo char(1) NOT NULL,
tfal_ofisec char(4),
tfal_ape varchar(35),
tfal_nom varchar(35),
tfal_anionac int2,
tfal_mesnac int2,
tfal_dianac int2,
tfal_aniofal int2,
tfal_mesfal int2,
tfal_diafal int2,
tfal_acta char(5),
tfal_tomo char(5),
tfal_folio char(4),
tfal_anioi int2,
tfal_provfal char(1),
tfal_dptofal char(2),
tfal_localfal varchar(30),
tfal_anioing int2,
tfal_mesing int2,
tfal_diaing int2,
tfal_fechaps int4,
tfal_fechacarga date,
CONSTRAINT tfal_pkey PRIMARY KEY (tfal_dni, tfal_sexo)
) WITH OIDS;
Does anyone had a trouble like this?, I don't understand what am I doing wrong. The version of the PGAdmin II I'm using is 1.4.12.
Could anyone lend me a hand please, thanks,
Andrés
From | Date | Subject | |
---|---|---|---|
Next Message | jmasand | 2003-02-25 06:03:31 | Problem : Postgres |
Previous Message | Andrés Repossi | 2003-02-24 14:49:36 | About COPY |