copy from ignores \,

From: "Bauhofer Mario" <m(dot)bauhofer(at)dieseitenmacher(dot)at>
To: <pgsql-general(at)postgresql(dot)org>
Subject: copy from ignores \,
Date: 2005-08-19 11:44:08
Message-ID: E1E65IC-0003Ju-DX@smartmx-02.inode.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

i tried to copy a german text file into a table "imp" using copy from.

SET client_encoding TO LATIN1; -- german umlaute

Copy imp from 'filepath/filename.txt' delimiter as ',' Null as '\n';

As you can see the "text" contains commas escaped by a backslash.

But copy from ignores the \, an treat them as a separator

Is this correct ?

Do I miss something.

Thx for the help!

Create table imp(

Id smallint,

numberx int4,

Text varchar(255)

)

...

458,9009009,sometext1\,sometext2\,sometext3

..

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Együd Csaba 2005-08-19 11:59:14 Re: How to DES encrypt/decrypt strings from PL/pgSQL
Previous Message Tino Wildenhain 2005-08-19 11:40:21 Re: Stored functions