Skip site navigation (1) Skip section navigation (2)

Escaping in COPY

From: "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Escaping in COPY
Date: 2002-06-05 18:16:26
Message-ID: 20020605181626.GB2113@bulletproof (view raw or flat)
Thread:
Lists: pgsql-interfaces
How exactly does one escape tabs, newlines etc. when using COPY?  

I remember reading somewhere that one just prefixes a backslash to them
before passing them to PQputline().  And indeed, that seems to work fine.

But when the data is retrieved using another COPY and PQgetline(), I
find the tabs are escaped as '\t'.  I looked around the website and the
mailing list archives, but found nothing on this subject.

Can anyone tell me the definitive place to look?


TIA,

Jeroen



Responses

pgsql-interfaces by date

Next:From: Gunther SchadowDate: 2002-06-05 21:54:58
Subject: Re: Escaping in COPY
Previous:From: Andreas KretzerDate: 2002-06-05 06:03:15
Subject: Re: lo_import problem under Windows+BCB5

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group