X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D6579474E5C for ; Tue, 25 Feb 2003 09:06:33 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 18653-05 for ; Tue, 25 Feb 2003 09:06:23 -0500 (EST) Received: from gardel2.pjn.gov.ar (unknown [200.47.41.44]) by postgresql.org (Postfix) with ESMTP id 49194474E53 for ; Tue, 25 Feb 2003 09:06:22 -0500 (EST) Received: from hcupjn13.pjn.gov.ar (gardel2.pjn.gov.ar [127.0.0.1]) by gardel2.pjn.gov.ar (8.11.2/8.11.2) with ESMTP id h1PEA9C00924 for ; Tue, 25 Feb 2003 11:10:09 -0300 Received: from hcupjn10.c1.pjn.gov.ar (hcupjn10.c1.pjn.gov.ar [10.1.1.11]) by hcupjn13.pjn.gov.ar (8.8.6 (PHNE_14041)/8.8.6) with ESMTP id KAA23917 for ; Tue, 25 Feb 2003 10:50:38 -0300 (SAT) Received: from uni124 (uni124.c1.pjn.gov.ar [10.2.2.124]) by hcupjn10.c1.pjn.gov.ar (8.8.6 (PHNE_14041)/8.8.6) with SMTP id LAA01827 for ; Tue, 25 Feb 2003 11:01:59 -0300 (SAT) Message-ID: <006001c2dcd7$390b0ca0$7c02020a@c1.pjn.gov.ar> From: =?iso-8859-1?Q?Andr=E9s_Repossi?= To: Subject: About COPY Date: Tue, 25 Feb 2003 11:07:24 -0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_005D_01C2DCBE.13517E40" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/386 X-Sequence-Number: 7584 This is a multi-part message in MIME format. ------=_NextPart_000_005D_01C2DCBE.13517E40 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I'm new working with PostgreSQL, and I'm trying to load an ascii text f= ile to a table using the command copy but it throws me an error message tha= t it can't parse the line, and I don't really don't know why is this hapeni= ng. The sentence I'm using is:=20=20 copy tfal from 'C:\\tfal.txt' with 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,=20=20 tfal_sexo char(1) NOT NULL,=20=20 tfal_ofisec char(4),=20=20 tfal_ape varchar(35),=20=20 tfal_nom varchar(35),=20=20 tfal_anionac int2,=20=20 tfal_mesnac int2,=20=20 tfal_dianac int2,=20=20 tfal_aniofal int2,=20=20 tfal_mesfal int2,=20=20 tfal_diafal int2,=20=20 tfal_acta char(5),=20=20 tfal_tomo char(5),=20=20 tfal_folio char(4),=20=20 tfal_anioi int2,=20=20 tfal_provfal char(1),=20=20 tfal_dptofal char(2),=20=20 tfal_localfal varchar(30),=20=20 tfal_anioing int2,=20=20 tfal_mesing int2,=20=20 tfal_diaing int2,=20=20 tfal_fechaps int4,=20=20 tfal_fechacarga date,=20=20 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 wr= ong. The version of the PGAdmin II I'm using is 1.4.12. Could anyone lend me a hand please, thanks, Andr=E9s ------=_NextPart_000_005D_01C2DCBE.13517E40 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi= , I'm new=20 working with PostgreSQL, and I'm trying to load an ascii text file to a tab= le=20 using the command copy but it throws me an error message that it can't pars= e the=20 line, and I don't really don't know why is this hapening.

The=20 sentence I'm using is: 

copy tfal from 'C:\\tfal.txt' with delimit= er=20 '|'

Te error message is: ERROR: parser: parse error at or near=20 "delimiter"

The tfal.txt has only one row, and the format of the row= =20 is:

5|M|118 |BELLAFRONTE|LUIS|0|0|0|1996|9|15|818 =20 |2    |54  |1996|B|||1996|11|1|0|02/04/2003|

and= , the=20 schema of the table is:

CREATE TABLE tfal (

tfal_dni int4 NOT= =20 NULL, 

tfal_sexo char(1) NOT NULL, 

tfal_ofisec= =20 char(4), 

tfal_ape varchar(35), 

tfal_nom=20 varchar(35), 

tfal_anionac int2, 

tfal_mesnac=20 int2, 

tfal_dianac int2, 

tfal_aniofal int2, = ;=20

tfal_mesfal int2, 

tfal_diafal int2, =20

tfal_acta char(5), 

tfal_tomo char(5), =20

tfal_folio char(4), 

tfal_anioi int2, =20

tfal_provfal char(1), 

tfal_dptofal char(2), =20

tfal_localfal varchar(30), 

tfal_anioing int2, = =20

tfal_mesing int2, 

tfal_diaing int2, =20

tfal_fechaps int4, 

tfal_fechacarga date, =20

CONSTRAINT tfal_pkey PRIMARY KEY (tfal_dni, tfal_sexo)

) WIT= H=20 OIDS;

Does anyone had a trouble like this?, I don't understand what = am I=20 doing wrong. The version of the PGAdmin II I'm using is 1.4.12.

Coul= d=20 anyone lend me a hand please,=20 thanks,


Andr=E9s
------=_NextPart_000_005D_01C2DCBE.13517E40--