Re: No quoting in copy CSV mode

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: No quoting in copy CSV mode
Date: 2006-05-10 01:00:54
Message-ID: 200605100100.k4A10sf10857@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Sean Davis wrote:
> I have a file that is tab-delimited text that I am trying to load via psql
> \copy (postgresql 8.1). It contains quotes (and every other character I
> have tried) as well as escapes. I therefore would like to use the escape
> parameter to COPY, but have no quoting characters be recognized. However,
> it seems that there is no way to turn off quoting in CSV mode. Any
> workarounds that folks see?

You use two double-quotes to represent a single double quote in the
data.

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Verena Ruff 2006-05-10 12:51:13 Re: error handling
Previous Message operationsengineer1 2006-05-09 22:23:29 Re: Math Operations - DB or App?