Re: Good Delimiter for copy command

From: SHARMILA JOTHIRAJAH <sharmi_jo(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org, Sam Mason <sam(at)samason(dot)me(dot)uk>
Subject: Re: Good Delimiter for copy command
Date: 2009-02-12 20:51:38
Message-ID: 580984.21817.qm@web110715.mail.gq1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

My data fields contains commas, tabs,'|'  etc. So I cant use t hem as delimiters..so I need a unique may be non-character to use as a delimiter...
-Sharmila

--- On Tue, 2/10/09, Sam Mason <sam(at)samason(dot)me(dot)uk> wrote:
From: Sam Mason <sam(at)samason(dot)me(dot)uk>
Subject: Re: [GENERAL] Good Delimiter for copy command
To: pgsql-general(at)postgresql(dot)org
Date: Tuesday, February 10, 2009, 2:41 PM

On Tue, Feb 10, 2009 at 07:07:42AM -0800, SHARMILA JOTHIRAJAH wrote:
> What is a good delimiter to use for COPY command. Im trying to use
> COPY command to copy data from one table to another in 2 different
> databases.
> Can you suggest a unique delimiter that I can use for this COPY command

If you're fixed with using COPY then what about just using CSV mode?

COPY table TO STDOUT WITH CSV;

If not then why not use pg_dump?

Sam

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2009-02-12 21:11:44 Re: Good Delimiter for copy command
Previous Message Paolo Saudin 2009-02-12 19:37:37 R: R: How to check if 2 series of data are equal

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-02-12 20:54:16 Re: GIST versus GIN indexes for intarrays
Previous Message Tom Lane 2009-02-12 20:33:56 Re: DISCARD ALL failing to acquire locks on pg_listen